diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index 7183b205c..3af926279 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -3450,6 +3450,22 @@ fn test() { S.foo()<|>; } | |||
3450 | assert_eq!(t, "u128"); | 3450 | assert_eq!(t, "u128"); |
3451 | } | 3451 | } |
3452 | 3452 | ||
3453 | #[ignore] | ||
3454 | #[test] | ||
3455 | fn method_resolution_by_value_before_autoref() { | ||
3456 | let t = type_at( | ||
3457 | r#" | ||
3458 | //- /main.rs | ||
3459 | trait Clone { fn clone(&self) -> Self; } | ||
3460 | struct S; | ||
3461 | impl Clone for S {} | ||
3462 | impl Clone for &S {} | ||
3463 | fn test() { (S.clone(), (&S).clone(), (&&S).clone())<|>; } | ||
3464 | "#, | ||
3465 | ); | ||
3466 | assert_eq!(t, "(S, S, &S)"); | ||
3467 | } | ||
3468 | |||
3453 | #[test] | 3469 | #[test] |
3454 | fn method_resolution_trait_before_autoderef() { | 3470 | fn method_resolution_trait_before_autoderef() { |
3455 | let t = type_at( | 3471 | let t = type_at( |