Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/regression.rs')
| -rw-r--r-- | crates/hir-ty/src/tests/regression.rs | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/crates/hir-ty/src/tests/regression.rs b/crates/hir-ty/src/tests/regression.rs index 638306054a..47c695c697 100644 --- a/crates/hir-ty/src/tests/regression.rs +++ b/crates/hir-ty/src/tests/regression.rs @@ -629,7 +629,7 @@ fn issue_4053_diesel_where_clauses() { 488..522 '{ ... }': () 498..502 'self': SelectStatement<F, S, D, W, O, LOf, {unknown}, {unknown}> 498..508 'self.order': O - 498..515 'self.o...into()': dyn QueryFragment<DB> + 498..515 'self.o...into()': dyn QueryFragment<DB> + 'static "#]], ); } @@ -773,7 +773,7 @@ fn issue_4800() { "#, expect![[r#" 379..383 'self': &'? mut PeerSet<D> - 401..424 '{ ... }': dyn Future<Output = ()> + 401..424 '{ ... }': dyn Future<Output = ()> + 'static 411..418 'loop {}': ! 416..418 '{}': () 575..579 'self': &'? mut Self @@ -2278,3 +2278,26 @@ fn test(x: bool) { "#]], ); } + +#[test] +fn issue_19730() { + check_infer( + r#" +trait Trait<T = Self> {} + +trait Foo { + type Bar<A, B>: Trait; + + fn foo<A, B>(bar: Self::Bar<A, B>) { + let _ = bar; + } +} +"#, + expect![[r#" + 83..86 'bar': Foo::Bar<Self, A, B> + 105..133 '{ ... }': () + 119..120 '_': Foo::Bar<Self, A, B> + 123..126 'bar': Foo::Bar<Self, A, B> + "#]], + ); +} |