diff options
Diffstat (limited to 'crates/hir_ty/src/tests/simple.rs')
-rw-r--r-- | crates/hir_ty/src/tests/simple.rs | 74 |
1 files changed, 35 insertions, 39 deletions
diff --git a/crates/hir_ty/src/tests/simple.rs b/crates/hir_ty/src/tests/simple.rs index b63cda912..68776f3c0 100644 --- a/crates/hir_ty/src/tests/simple.rs +++ b/crates/hir_ty/src/tests/simple.rs | |||
@@ -2606,11 +2606,8 @@ fn f() { | |||
2606 | fn infer_boxed_self_receiver() { | 2606 | fn infer_boxed_self_receiver() { |
2607 | check_infer( | 2607 | check_infer( |
2608 | r#" | 2608 | r#" |
2609 | #[lang = "deref"] | 2609 | //- minicore: deref |
2610 | pub trait Deref { | 2610 | use core::ops::Deref; |
2611 | type Target; | ||
2612 | fn deref(&self) -> &Self::Target; | ||
2613 | } | ||
2614 | 2611 | ||
2615 | struct Box<T>(T); | 2612 | struct Box<T>(T); |
2616 | 2613 | ||
@@ -2642,40 +2639,39 @@ fn main() { | |||
2642 | } | 2639 | } |
2643 | "#, | 2640 | "#, |
2644 | expect![[r#" | 2641 | expect![[r#" |
2645 | 67..71 'self': &Self | 2642 | 104..108 'self': &Box<T> |
2646 | 175..179 'self': &Box<T> | 2643 | 188..192 'self': &Box<Foo<T>> |
2647 | 259..263 'self': &Box<Foo<T>> | 2644 | 218..220 '{}': () |
2648 | 289..291 '{}': () | 2645 | 242..246 'self': &Box<Foo<T>> |
2649 | 313..317 'self': &Box<Foo<T>> | 2646 | 275..277 '{}': () |
2650 | 346..348 '{}': () | 2647 | 297..301 'self': Box<Foo<T>> |
2651 | 368..372 'self': Box<Foo<T>> | 2648 | 322..324 '{}': () |
2652 | 393..395 '{}': () | 2649 | 338..559 '{ ...r(); }': () |
2653 | 409..630 '{ ...r(); }': () | 2650 | 348..353 'boxed': Box<Foo<i32>> |
2654 | 419..424 'boxed': Box<Foo<i32>> | 2651 | 356..359 'Box': Box<Foo<i32>>(Foo<i32>) -> Box<Foo<i32>> |
2655 | 427..430 'Box': Box<Foo<i32>>(Foo<i32>) -> Box<Foo<i32>> | 2652 | 356..371 'Box(Foo(0_i32))': Box<Foo<i32>> |
2656 | 427..442 'Box(Foo(0_i32))': Box<Foo<i32>> | 2653 | 360..363 'Foo': Foo<i32>(i32) -> Foo<i32> |
2657 | 431..434 'Foo': Foo<i32>(i32) -> Foo<i32> | 2654 | 360..370 'Foo(0_i32)': Foo<i32> |
2658 | 431..441 'Foo(0_i32)': Foo<i32> | 2655 | 364..369 '0_i32': i32 |
2659 | 435..440 '0_i32': i32 | 2656 | 382..386 'bad1': &i32 |
2660 | 453..457 'bad1': &i32 | 2657 | 389..394 'boxed': Box<Foo<i32>> |
2661 | 460..465 'boxed': Box<Foo<i32>> | 2658 | 389..406 'boxed....nner()': &i32 |
2662 | 460..477 'boxed....nner()': &i32 | 2659 | 416..421 'good1': &i32 |
2663 | 487..492 'good1': &i32 | 2660 | 424..438 'Foo::get_inner': fn get_inner<i32>(&Box<Foo<i32>>) -> &i32 |
2664 | 495..509 'Foo::get_inner': fn get_inner<i32>(&Box<Foo<i32>>) -> &i32 | 2661 | 424..446 'Foo::g...boxed)': &i32 |
2665 | 495..517 'Foo::g...boxed)': &i32 | 2662 | 439..445 '&boxed': &Box<Foo<i32>> |
2666 | 510..516 '&boxed': &Box<Foo<i32>> | 2663 | 440..445 'boxed': Box<Foo<i32>> |
2667 | 511..516 'boxed': Box<Foo<i32>> | 2664 | 457..461 'bad2': &Foo<i32> |
2668 | 528..532 'bad2': &Foo<i32> | 2665 | 464..469 'boxed': Box<Foo<i32>> |
2669 | 535..540 'boxed': Box<Foo<i32>> | 2666 | 464..480 'boxed....self()': &Foo<i32> |
2670 | 535..551 'boxed....self()': &Foo<i32> | 2667 | 490..495 'good2': &Foo<i32> |
2671 | 561..566 'good2': &Foo<i32> | 2668 | 498..511 'Foo::get_self': fn get_self<i32>(&Box<Foo<i32>>) -> &Foo<i32> |
2672 | 569..582 'Foo::get_self': fn get_self<i32>(&Box<Foo<i32>>) -> &Foo<i32> | 2669 | 498..519 'Foo::g...boxed)': &Foo<i32> |
2673 | 569..590 'Foo::g...boxed)': &Foo<i32> | 2670 | 512..518 '&boxed': &Box<Foo<i32>> |
2674 | 583..589 '&boxed': &Box<Foo<i32>> | 2671 | 513..518 'boxed': Box<Foo<i32>> |
2675 | 584..589 'boxed': Box<Foo<i32>> | 2672 | 530..535 'inner': Foo<i32> |
2676 | 601..606 'inner': Foo<i32> | 2673 | 538..543 'boxed': Box<Foo<i32>> |
2677 | 609..614 'boxed': Box<Foo<i32>> | 2674 | 538..556 'boxed....nner()': Foo<i32> |
2678 | 609..627 'boxed....nner()': Foo<i32> | ||
2679 | "#]], | 2675 | "#]], |
2680 | ); | 2676 | ); |
2681 | } | 2677 | } |