diff options
Diffstat (limited to 'crates/hir_ty/src/tests/regression.rs')
-rw-r--r-- | crates/hir_ty/src/tests/regression.rs | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/crates/hir_ty/src/tests/regression.rs b/crates/hir_ty/src/tests/regression.rs index 94b628fb8..0f418ea49 100644 --- a/crates/hir_ty/src/tests/regression.rs +++ b/crates/hir_ty/src/tests/regression.rs | |||
@@ -792,6 +792,7 @@ fn issue_4800() { | |||
792 | fn issue_4966() { | 792 | fn issue_4966() { |
793 | check_infer( | 793 | check_infer( |
794 | r#" | 794 | r#" |
795 | //- minicore: deref | ||
795 | pub trait IntoIterator { | 796 | pub trait IntoIterator { |
796 | type Item; | 797 | type Item; |
797 | } | 798 | } |
@@ -802,12 +803,7 @@ fn issue_4966() { | |||
802 | 803 | ||
803 | struct Vec<T> {} | 804 | struct Vec<T> {} |
804 | 805 | ||
805 | #[lang = "deref"] | 806 | impl<T> core::ops::Deref for Vec<T> { |
806 | pub trait Deref { | ||
807 | type Target; | ||
808 | } | ||
809 | |||
810 | impl<T> Deref for Vec<T> { | ||
811 | type Target = [T]; | 807 | type Target = [T]; |
812 | } | 808 | } |
813 | 809 | ||
@@ -824,23 +820,23 @@ fn issue_4966() { | |||
824 | } | 820 | } |
825 | "#, | 821 | "#, |
826 | expect![[r#" | 822 | expect![[r#" |
827 | 270..274 'iter': T | 823 | 225..229 'iter': T |
828 | 289..291 '{}': () | 824 | 244..246 '{}': () |
829 | 303..447 '{ ...r(); }': () | 825 | 258..402 '{ ...r(); }': () |
830 | 313..318 'inner': Map<|&f64| -> f64> | 826 | 268..273 'inner': Map<|&f64| -> f64> |
831 | 321..345 'Map { ... 0.0 }': Map<|&f64| -> f64> | 827 | 276..300 'Map { ... 0.0 }': Map<|&f64| -> f64> |
832 | 330..343 '|_: &f64| 0.0': |&f64| -> f64 | 828 | 285..298 '|_: &f64| 0.0': |&f64| -> f64 |
833 | 331..332 '_': &f64 | 829 | 286..287 '_': &f64 |
834 | 340..343 '0.0': f64 | 830 | 295..298 '0.0': f64 |
835 | 356..362 'repeat': Repeat<Map<|&f64| -> f64>> | 831 | 311..317 'repeat': Repeat<Map<|&f64| -> f64>> |
836 | 365..390 'Repeat...nner }': Repeat<Map<|&f64| -> f64>> | 832 | 320..345 'Repeat...nner }': Repeat<Map<|&f64| -> f64>> |
837 | 383..388 'inner': Map<|&f64| -> f64> | 833 | 338..343 'inner': Map<|&f64| -> f64> |
838 | 401..404 'vec': Vec<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>> | 834 | 356..359 'vec': Vec<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>> |
839 | 407..416 'from_iter': fn from_iter<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>, Repeat<Map<|&f64| -> f64>>>(Repeat<Map<|&f64| -> f64>>) -> Vec<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>> | 835 | 362..371 'from_iter': fn from_iter<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>, Repeat<Map<|&f64| -> f64>>>(Repeat<Map<|&f64| -> f64>>) -> Vec<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>> |
840 | 407..424 'from_i...epeat)': Vec<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>> | 836 | 362..379 'from_i...epeat)': Vec<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>> |
841 | 417..423 'repeat': Repeat<Map<|&f64| -> f64>> | 837 | 372..378 'repeat': Repeat<Map<|&f64| -> f64>> |
842 | 431..434 'vec': Vec<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>> | 838 | 386..389 'vec': Vec<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>> |
843 | 431..444 'vec.foo_bar()': {unknown} | 839 | 386..399 'vec.foo_bar()': {unknown} |
844 | "#]], | 840 | "#]], |
845 | ); | 841 | ); |
846 | } | 842 | } |