aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/tests')
-rw-r--r--crates/hir_ty/src/tests/method_resolution.rs4
-rw-r--r--crates/hir_ty/src/tests/traits.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_ty/src/tests/method_resolution.rs b/crates/hir_ty/src/tests/method_resolution.rs
index 80e795fbf..659b8fce9 100644
--- a/crates/hir_ty/src/tests/method_resolution.rs
+++ b/crates/hir_ty/src/tests/method_resolution.rs
@@ -1114,14 +1114,14 @@ fn method_on_dyn_impl() {
1114trait Foo {} 1114trait Foo {}
1115 1115
1116impl Foo for u32 {} 1116impl Foo for u32 {}
1117impl dyn Foo { 1117impl dyn Foo + '_ {
1118 pub fn dyn_foo(&self) -> u32 { 1118 pub fn dyn_foo(&self) -> u32 {
1119 0 1119 0
1120 } 1120 }
1121} 1121}
1122 1122
1123fn main() { 1123fn main() {
1124 let f = &42u32 as &dyn Foo<u32>; 1124 let f = &42u32 as &dyn Foo;
1125 f.dyn_foo(); 1125 f.dyn_foo();
1126 // ^u32 1126 // ^u32
1127} 1127}
diff --git a/crates/hir_ty/src/tests/traits.rs b/crates/hir_ty/src/tests/traits.rs
index 7fce441f2..1298e5a88 100644
--- a/crates/hir_ty/src/tests/traits.rs
+++ b/crates/hir_ty/src/tests/traits.rs
@@ -1409,10 +1409,10 @@ fn weird_bounds() {
1409 fn test(a: impl Trait + 'lifetime, b: impl 'lifetime, c: impl (Trait), d: impl ('lifetime), e: impl ?Sized, f: impl Trait + ?Sized) {} 1409 fn test(a: impl Trait + 'lifetime, b: impl 'lifetime, c: impl (Trait), d: impl ('lifetime), e: impl ?Sized, f: impl Trait + ?Sized) {}
1410 "#, 1410 "#,
1411 expect![[r#" 1411 expect![[r#"
1412 23..24 'a': impl Trait + {error} 1412 23..24 'a': impl Trait
1413 50..51 'b': impl {error} 1413 50..51 'b': impl
1414 69..70 'c': impl Trait 1414 69..70 'c': impl Trait
1415 86..87 'd': impl {error} 1415 86..87 'd': impl
1416 107..108 'e': impl {error} 1416 107..108 'e': impl {error}
1417 123..124 'f': impl Trait + {error} 1417 123..124 'f': impl Trait + {error}
1418 147..149 '{}': () 1418 147..149 '{}': ()