diff options
Diffstat (limited to 'crates/ra_hir_ty/src/tests')
-rw-r--r-- | crates/ra_hir_ty/src/tests/traits.rs | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/crates/ra_hir_ty/src/tests/traits.rs b/crates/ra_hir_ty/src/tests/traits.rs index a6ac18f86..764ab2800 100644 --- a/crates/ra_hir_ty/src/tests/traits.rs +++ b/crates/ra_hir_ty/src/tests/traits.rs | |||
@@ -994,29 +994,17 @@ fn weird_bounds() { | |||
994 | assert_snapshot!( | 994 | assert_snapshot!( |
995 | infer(r#" | 995 | infer(r#" |
996 | trait Trait {} | 996 | trait Trait {} |
997 | fn test() { | 997 | fn test(a: impl Trait + 'lifetime, b: impl 'lifetime, c: impl (Trait), d: impl ('lifetime), e: impl ?Sized, f: impl Trait + ?Sized) { |
998 | let a: impl Trait + 'lifetime = foo; | ||
999 | let b: impl 'lifetime = foo; | ||
1000 | let b: impl (Trait) = foo; | ||
1001 | let b: impl ('lifetime) = foo; | ||
1002 | let d: impl ?Sized = foo; | ||
1003 | let e: impl Trait + ?Sized = foo; | ||
1004 | } | 998 | } |
1005 | "#), | 999 | "#), |
1006 | @r###" | 1000 | @r###" |
1007 | [26; 237) '{ ...foo; }': () | 1001 | [24; 25) 'a': impl Trait + {error} |
1008 | [36; 37) 'a': impl Trait + {error} | 1002 | [51; 52) 'b': impl {error} |
1009 | [64; 67) 'foo': impl Trait + {error} | 1003 | [70; 71) 'c': impl Trait |
1010 | [77; 78) 'b': impl {error} | 1004 | [87; 88) 'd': impl {error} |
1011 | [97; 100) 'foo': impl {error} | 1005 | [108; 109) 'e': impl {error} |
1012 | [110; 111) 'b': impl Trait | 1006 | [124; 125) 'f': impl Trait + {error} |
1013 | [128; 131) 'foo': impl Trait | 1007 | [148; 151) '{ }': () |
1014 | [141; 142) 'b': impl {error} | ||
1015 | [163; 166) 'foo': impl {error} | ||
1016 | [176; 177) 'd': impl {error} | ||
1017 | [193; 196) 'foo': impl {error} | ||
1018 | [206; 207) 'e': impl Trait + {error} | ||
1019 | [231; 234) 'foo': impl Trait + {error} | ||
1020 | "### | 1008 | "### |
1021 | ); | 1009 | ); |
1022 | } | 1010 | } |