diff options
Diffstat (limited to 'crates/hir_ty/src/tests/method_resolution.rs')
-rw-r--r-- | crates/hir_ty/src/tests/method_resolution.rs | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/crates/hir_ty/src/tests/method_resolution.rs b/crates/hir_ty/src/tests/method_resolution.rs index 79108054c..d9b5ee9cf 100644 --- a/crates/hir_ty/src/tests/method_resolution.rs +++ b/crates/hir_ty/src/tests/method_resolution.rs | |||
@@ -1222,11 +1222,7 @@ fn autoderef_visibility_method() { | |||
1222 | cov_mark::check!(autoderef_candidate_not_visible); | 1222 | cov_mark::check!(autoderef_candidate_not_visible); |
1223 | check_infer( | 1223 | check_infer( |
1224 | r#" | 1224 | r#" |
1225 | #[lang = "deref"] | 1225 | //- minicore: deref |
1226 | pub trait Deref { | ||
1227 | type Target; | ||
1228 | fn deref(&self) -> &Self::Target; | ||
1229 | } | ||
1230 | mod a { | 1226 | mod a { |
1231 | pub struct Foo(pub char); | 1227 | pub struct Foo(pub char); |
1232 | impl Foo { | 1228 | impl Foo { |
@@ -1243,7 +1239,7 @@ mod a { | |||
1243 | self.0 | 1239 | self.0 |
1244 | } | 1240 | } |
1245 | } | 1241 | } |
1246 | impl super::Deref for Bar { | 1242 | impl core::ops::Deref for Bar { |
1247 | type Target = Foo; | 1243 | type Target = Foo; |
1248 | fn deref(&self) -> &Foo { | 1244 | fn deref(&self) -> &Foo { |
1249 | &Foo('z') | 1245 | &Foo('z') |
@@ -1257,30 +1253,29 @@ mod b { | |||
1257 | } | 1253 | } |
1258 | "#, | 1254 | "#, |
1259 | expect![[r#" | 1255 | expect![[r#" |
1260 | 67..71 'self': &Self | 1256 | 75..79 'self': &Foo |
1261 | 168..172 'self': &Foo | 1257 | 89..119 '{ ... }': char |
1262 | 182..212 '{ ... }': char | 1258 | 103..107 'self': &Foo |
1263 | 196..200 'self': &Foo | 1259 | 103..109 'self.0': char |
1264 | 196..202 'self.0': char | 1260 | 195..226 '{ ... }': Bar |
1265 | 288..319 '{ ... }': Bar | 1261 | 209..213 'Self': Bar(i32) -> Bar |
1266 | 302..306 'Self': Bar(i32) -> Bar | 1262 | 209..216 'Self(0)': Bar |
1267 | 302..309 'Self(0)': Bar | 1263 | 214..215 '0': i32 |
1268 | 307..308 '0': i32 | 1264 | 245..249 'self': &Bar |
1269 | 338..342 'self': &Bar | 1265 | 258..288 '{ ... }': i32 |
1270 | 351..381 '{ ... }': i32 | 1266 | 272..276 'self': &Bar |
1271 | 365..369 'self': &Bar | 1267 | 272..278 'self.0': i32 |
1272 | 365..371 'self.0': i32 | 1268 | 376..380 'self': &Bar |
1273 | 465..469 'self': &Bar | 1269 | 390..423 '{ ... }': &Foo |
1274 | 479..512 '{ ... }': &Foo | 1270 | 404..413 '&Foo('z')': &Foo |
1275 | 493..502 '&Foo('z')': &Foo | 1271 | 405..408 'Foo': Foo(char) -> Foo |
1276 | 494..497 'Foo': Foo(char) -> Foo | 1272 | 405..413 'Foo('z')': Foo |
1277 | 494..502 'Foo('z')': Foo | 1273 | 409..412 ''z'': char |
1278 | 498..501 ''z'': char | 1274 | 453..506 '{ ... }': () |
1279 | 542..595 '{ ... }': () | 1275 | 467..468 'x': char |
1280 | 556..557 'x': char | 1276 | 471..489 'super:...r::new': fn new() -> Bar |
1281 | 560..578 'super:...r::new': fn new() -> Bar | 1277 | 471..491 'super:...:new()': Bar |
1282 | 560..580 'super:...:new()': Bar | 1278 | 471..499 'super:...ango()': char |
1283 | 560..588 'super:...ango()': char | ||
1284 | "#]], | 1279 | "#]], |
1285 | ) | 1280 | ) |
1286 | } | 1281 | } |