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 '9b3d03408c66749d56466bb09baf2a7177deb6ce' into sync-from-ra
2023-08-21 12:44:09 +03:00
ponyii
e4c45427dc
refactoring
2023-08-08 21:57:55 +04:00
ponyii
61cabe029f
the "add missing members" assists: supported bracketed default const values
2023-08-08 21:57:55 +04:00
ponyii
4ebdc6f052
syntax update: the default value of ConstParam
turned from Expr
into ConstArg
2023-08-08 21:57:54 +04:00
ponyii
52b4392724
the "add missing members" assists: implemented substitution of default values of const params
2023-08-08 21:57:54 +04:00
Laurențiu Nicola
4704881b64
Merge commit '37f84c101bca43b11027f30ab0c2852f9325bc3d' into sync-from-ra
2023-07-17 16:49:15 +03:00
hkalbasi
6f7452882a
Fix layout of simd types and respect align in mir interpreter
2023-07-02 00:42:33 +03:30
Laurențiu Nicola
c48062fe2a
Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-from-ra
2023-06-05 12:04:23 +03:00
hkalbasi
f9e3b180b7
Add enum, reference, array and slice to render_const_scalar
2023-06-02 13:47:02 +03:30
hkalbasi
cbcafd3539
MIR episode 5
2023-05-12 18:17:15 +03:30
Lukas Wirth
8081a654da
feat: Closure capture inlay hints
2023-05-05 13:38:22 +02:00
Laurențiu Nicola
7197a27028
Use triomphe Arc
2023-05-02 20:02:43 +03:00
hkalbasi
6312fbf521
MIR episode 4
2023-05-01 23:23:10 +03:30
hkalbasi
5df545b3f0
Add hover for closure
2023-04-30 14:31:43 +03:30