Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/method_resolution.rs')
-rw-r--r--crates/hir-ty/src/tests/method_resolution.rs37
1 files changed, 15 insertions, 22 deletions
diff --git a/crates/hir-ty/src/tests/method_resolution.rs b/crates/hir-ty/src/tests/method_resolution.rs
index c837fae3fe..8609ba4103 100644
--- a/crates/hir-ty/src/tests/method_resolution.rs
+++ b/crates/hir-ty/src/tests/method_resolution.rs
@@ -1462,28 +1462,6 @@ fn f() {
}
#[test]
-fn trait_impl_in_synstructure_const() {
- check_types(
- r#"
-struct S;
-
-trait Tr {
- fn method(&self) -> u16;
-}
-
-const _DERIVE_Tr_: () = {
- impl Tr for S {}
-};
-
-fn f() {
- S.method();
- //^^^^^^^^^^ u16
-}
- "#,
- );
-}
-
-#[test]
fn inherent_impl_in_unnamed_const() {
check_types(
r#"
@@ -1796,6 +1774,21 @@ fn test() {
}
#[test]
+fn deref_into_inference_var() {
+ check_types(
+ r#"
+//- minicore:deref
+struct A<T>(T);
+impl core::ops::Deref for A<u32> {}
+impl A<i32> { fn foo(&self) {} }
+fn main() {
+ A(0).foo();
+ //^^^^^^^^^^ ()
+}
+"#,
+ );
+}
+#[test]
fn receiver_adjustment_autoref() {
check(
r#"