Nadrieril
40731f4bd6
rust-analyzer: use in-tree pattern_analysis crate
2024-08-14 20:52:19 +02:00
Shoyu Vanilla
c530e21714
feat: Implement TAIT
2024-08-10 15:22:05 +09:00
Lukas Wirth
df5f1777b8
More symbol usage
2024-07-16 12:05:16 +02:00
Lukas Wirth
f2d51073d2
Use statics + clone instead of const until const can access statics
2024-07-14 17:52:59 +02:00
Lukas Wirth
3fe815b0f3
Use Symbol in Name
2024-07-12 16:06:44 +02:00
Lukas Wirth
21a3d01875
Remove inline rust_2018_idioms, unused_lifetimes
lint warn, Cargo.toml already enforces this
2024-06-30 15:23:54 +02:00
Lukas Wirth
3168ab5b99
Enum variants are not generic def ids
2024-06-24 10:07:31 +02:00
Lukas Wirth
4c62e6b05f
Prevent re-allocation in CallableSig::from_params_and_return
2024-06-21 19:26:08 +02:00
Lukas Wirth
34ba8db3ed
Save allocations for empty generic_defaults query results
2024-06-21 19:21:27 +02:00
Lukas Wirth
585cc9e014
Extract generics module
2024-06-21 10:55:05 +02:00
Wilfred Hughes
3874681cb6
Prefer plain trait definitions over macros for salsa
2024-06-13 17:32:06 -07:00
Lukas Wirth
7bd343e085
Show fn traits in signature info for trait implementors
2024-05-18 16:22:59 +02:00
Lukas Wirth
1915980031
fix: Fix impl Trait<Self>
causing stackoverflows
2024-04-15 15:41:20 +02:00
Lukas Wirth
8078c3d9e8
Bump chalk
2024-04-08 11:03:19 +02:00
Lukas Wirth
a82e028e30
Cleanup util::Generics method names
2024-04-06 14:29:40 +02:00
Lukas Wirth
336dee3415
Remove some allocs
2024-04-06 13:40:15 +02:00
Lukas Wirth
0927f86247
Replace static_lifetime usages with error_lifetime, lower outlives goals
2024-04-02 14:51:06 +02:00
bors
0583aaa555
Auto merge of #16805 - dfireBird:lifetime_lowering, r=Veykril
...
feat: Implement resolving and lowering of Lifetimes (no inference yet)
2024-03-26 07:58:43 +00:00
Nadrieril
1716cc8433
Revert to the crates.io version of rustc_pattern_analysis
2024-03-25 13:09:37 +01:00
dfireBird
b357bcab2b
modify insert_type_vars
for lifetimes
2024-03-19 10:14:45 +05:30
dfireBird
a6c8cbfd91
update Generics
iter methods to return GenericParamId
2024-03-18 17:18:08 +05:30
dfireBird
d6e3929841
include lifetime in ParamKind and in Generics::provenance_split
2024-03-18 17:18:08 +05:30
dfireBird
e463a3e1cf
update make_binders
to include lifetimes in generics
...
adds a bunch of iter methods that include lifetimes
2024-03-18 17:18:08 +05:30
dfireBird
16493e301e
fix index returned for the use of BoundVar
2024-03-18 17:18:08 +05:30
bors
d3eeadc242
Auto merge of #16852 - ShoyuVanilla:atpit, r=Veykril
...
feat: Implement ATPIT
Resolves #16584
Note: This implementation only works for ATPIT, not for TAIT.
The main hinderence that blocks the later is the defining sites of TAIT can be inner blocks like in;
```rust
type X = impl Default;
mod foo {
fn bar() -> super::X {
()
}
}
```
So, to figure out we are defining it or not, we should recursively probe for nested modules and bodies.
For ATPIT, we can just look into current body because `error[E0401]: can't use 'Self' from outer item` prevent such nested structures;
```rust
trait Foo {
type Item;
fn foo() -> Self::Item;
}
struct Bar;
impl Foo for Bar {
type Item = impl Default;
fn foo() -> Self::Item {
fn bar() -> Self::Item {
^^^^^^^^^^
|
use of `Self` from outer item
refer to the type directly here instead
5
}
bar()
}
}
```
But this implementation does not checks for unification of same ATPIT between different bodies, monomorphization, nor layout for similar reason. (But these can be done with lazyness if we can utilize something like "mutation of interned value" with `db`. I coundn't find such thing but I would appreciate it if such thing exists and you could let me know 😅 )
2024-03-18 10:38:24 +00:00
Nadrieril
8d59aaf735
Use in-tree rustc_pattern_analysis
2024-03-17 14:16:30 +01:00
Shoyu Vanilla
d2aba91a0c
feat: Implement ATPIT
2024-03-16 03:31:12 +09:00
Tavo Annus
bb3c7cff60
Introduce term search to rust-analyzer
2024-02-11 13:33:29 +02:00
Lukas Wirth
5136705fad
internal: Remove SELF_REF hack for self referential SyntaxContexts
2024-02-10 16:20:02 +01:00
Tetsuharu Ohzeki
c6637f39c0
clippy: Enable borrowed_box
rule
2024-02-10 00:14:17 +09:00
clubby789
a1fdb876c3
Remove abi_amdgpu_kernel
references
2024-01-31 19:06:10 +00:00
Lukas Wirth
8a5829cf28
Re-order mod declarations
2024-01-27 11:02:34 +01:00
Nadrieril
2370b70f25
Replace local copy of exhaustiveness checking with upstream librarified version
2024-01-23 15:54:00 +01:00
Johann Hemmann
9dd07f0bc4
should_implement_trait
2024-01-19 17:53:09 +01:00
Lukas Wirth
46e38318a2
Stub out FnAbi::partial_eq as a workaround for now
2024-01-19 15:15:23 +01:00
Lukas Wirth
3a722bdf2e
feat:Record FnAbi
2024-01-19 15:15:23 +01:00
Johann Hemmann
fad4fa163c
cargo clippy --fix
2024-01-18 13:59:49 +01:00
Lukas Wirth
f972da70d4
Remove rustc_dependencies crate
2024-01-08 15:39:35 +01:00
Lukas Wirth
5ac0c14384
Remove some vec clones in const-eval
2024-01-06 21:33:47 +01:00
Lukas Wirth
5125063a21
Remove unnecessary cloning
2024-01-06 17:48:07 +01:00
Lukas Wirth
c9c4053eed
More aliases
2024-01-06 16:58:15 +01:00
Lukas Wirth
143203b713
Make TraitEnvironment's constructor private
2023-12-08 10:47:36 +01:00
David Barsky
c17dcc8d90
internal: switch to Arc::from_iter
2023-12-06 13:08:45 -05:00
Johannes Hostert
374affea3c
make ParamLoweringMode accessible
2023-12-06 15:12:55 +01:00
Igor Matuszewski
a7224c998d
Don't explicitly warn against semicolon_in_expressions_from_macros
...
This has been warn-by-default for two years now and has already been
added to the future-incompat lints in 1.68.
2023-12-05 11:35:09 +01:00
Laurențiu Nicola
6b53c09ef5
Merge branch 'master' into sync-from-rust
2023-11-15 09:46:27 +02:00
Lukas Wirth
6ddccc9a6e
Diagnose some orphan trait impl cases
2023-11-14 18:09:34 +01:00
Laurențiu Nicola
b6951defa6
Add missing rustc_private features
2023-11-13 21:38:57 +02:00
Laurențiu Nicola
30d8aa1bec
Merge commit ' 9b3d03408c
' into sync-from-ra
2023-08-21 12:44:09 +03:00
ponyii
e4c45427dc
refactoring
2023-08-08 21:57:55 +04:00