diff options
Diffstat (limited to 'crates/hir_ty/src/tests/regression.rs')
-rw-r--r-- | crates/hir_ty/src/tests/regression.rs | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/crates/hir_ty/src/tests/regression.rs b/crates/hir_ty/src/tests/regression.rs index 1019e783b..1e0233b55 100644 --- a/crates/hir_ty/src/tests/regression.rs +++ b/crates/hir_ty/src/tests/regression.rs | |||
@@ -927,35 +927,33 @@ fn issue_6628() { | |||
927 | fn issue_6852() { | 927 | fn issue_6852() { |
928 | check_infer( | 928 | check_infer( |
929 | r#" | 929 | r#" |
930 | #[lang = "deref"] | 930 | //- minicore: deref |
931 | pub trait Deref { | 931 | use core::ops::Deref; |
932 | type Target; | ||
933 | } | ||
934 | 932 | ||
935 | struct BufWriter {} | 933 | struct BufWriter {} |
936 | 934 | ||
937 | struct Mutex<T> {} | 935 | struct Mutex<T> {} |
938 | struct MutexGuard<'a, T> {} | 936 | struct MutexGuard<'a, T> {} |
939 | impl<T> Mutex<T> { | 937 | impl<T> Mutex<T> { |
940 | fn lock(&self) -> MutexGuard<'_, T> {} | 938 | fn lock(&self) -> MutexGuard<'_, T> {} |
941 | } | 939 | } |
942 | impl<'a, T: 'a> Deref for MutexGuard<'a, T> { | 940 | impl<'a, T: 'a> Deref for MutexGuard<'a, T> { |
943 | type Target = T; | 941 | type Target = T; |
944 | } | 942 | } |
945 | fn flush(&self) { | 943 | fn flush(&self) { |
946 | let w: &Mutex<BufWriter>; | 944 | let w: &Mutex<BufWriter>; |
947 | *(w.lock()); | 945 | *(w.lock()); |
948 | } | 946 | } |
949 | "#, | 947 | "#, |
950 | expect![[r#" | 948 | expect![[r#" |
951 | 156..160 'self': &Mutex<T> | 949 | 123..127 'self': &Mutex<T> |
952 | 183..185 '{}': () | 950 | 150..152 '{}': () |
953 | 267..271 'self': &{unknown} | 951 | 234..238 'self': &{unknown} |
954 | 273..323 '{ ...()); }': () | 952 | 240..290 '{ ...()); }': () |
955 | 283..284 'w': &Mutex<BufWriter> | 953 | 250..251 'w': &Mutex<BufWriter> |
956 | 309..320 '*(w.lock())': BufWriter | 954 | 276..287 '*(w.lock())': BufWriter |
957 | 311..312 'w': &Mutex<BufWriter> | 955 | 278..279 'w': &Mutex<BufWriter> |
958 | 311..319 'w.lock()': MutexGuard<BufWriter> | 956 | 278..286 'w.lock()': MutexGuard<BufWriter> |
959 | "#]], | 957 | "#]], |
960 | ); | 958 | ); |
961 | } | 959 | } |