aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/ty/tests.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs
index 1bd677cab..b5d3c0180 100644
--- a/crates/ra_hir/src/ty/tests.rs
+++ b/crates/ra_hir/src/ty/tests.rs
@@ -2613,18 +2613,18 @@ fn infer_call_trait_method_on_generic_param_1() {
2613 assert_snapshot!( 2613 assert_snapshot!(
2614 infer(r#" 2614 infer(r#"
2615trait Trait { 2615trait Trait {
2616 fn method() -> u32; 2616 fn method(&self) -> u32;
2617} 2617}
2618fn test<T: Trait>(t: T) { 2618fn test<T: Trait>(t: T) {
2619 t.method(); 2619 t.method();
2620} 2620}
2621"#), 2621"#),
2622 @r###" 2622 @r###"
2623 2623 [30; 34) 'self': &Self
2624 [59; 60) 't': T 2624 [64; 65) 't': T
2625 [65; 84) '{ ...d(); }': () 2625 [70; 89) '{ ...d(); }': ()
2626 [71; 72) 't': T 2626 [76; 77) 't': T
2627 [71; 81) 't.method()': {unknown} 2627 [76; 86) 't.method()': u32
2628 "### 2628 "###
2629 ); 2629 );
2630} 2630}
@@ -2634,18 +2634,18 @@ fn infer_call_trait_method_on_generic_param_2() {
2634 assert_snapshot!( 2634 assert_snapshot!(
2635 infer(r#" 2635 infer(r#"
2636trait Trait<T> { 2636trait Trait<T> {
2637 fn method() -> T; 2637 fn method(&self) -> T;
2638} 2638}
2639fn test<U, T: Trait<U>>(t: T) { 2639fn test<U, T: Trait<U>>(t: T) {
2640 t.method(); 2640 t.method();
2641} 2641}
2642"#), 2642"#),
2643 @r###" 2643 @r###"
2644 2644 [33; 37) 'self': &Self
2645 [66; 67) 't': T 2645 [71; 72) 't': T
2646 [72; 91) '{ ...d(); }': () 2646 [77; 96) '{ ...d(); }': ()
2647 [78; 79) 't': T 2647 [83; 84) 't': T
2648 [78; 88) 't.method()': {unknown} 2648 [83; 93) 't.method()': [missing name]
2649 "### 2649 "###
2650 ); 2650 );
2651} 2651}