mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 07:37:30 +00:00
Merge #7732
7732: Don't lower TypeBound::Lifetime as GenericPredicate::Error r=flodiebold a=Veykril
Basically we just discard the typebound for now instead when lowering to `GenericPredicate`. I think this shouldn't have any other side effects?
Fixes #7683(hopefully for real this time)
I also played around with introducing `GenericPredicate::LifetimeOutlives` and `GenericPredicate::TypeOutlives`(see b9d6904845
) but that won't fix this issue(at least not for now) due to lifetime predicate mismatches when resolving methods so I figure this is a good way to fix it for now.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
62bc753f8b
6 changed files with 45 additions and 37 deletions
|
@ -3417,7 +3417,7 @@ impl<T> Foo<T$0> {}
|
|||
```
|
||||
"#]],
|
||||
);
|
||||
// lifetimes aren't being substituted yet
|
||||
// lifetimes bounds arent being tracked yet
|
||||
check(
|
||||
r#"
|
||||
struct Foo<T>(T);
|
||||
|
@ -3427,7 +3427,7 @@ impl<T: 'static> Foo<T$0> {}
|
|||
*T*
|
||||
|
||||
```rust
|
||||
T: {error}
|
||||
T
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue