From 65bd9bc3a800e09f52a315cf98e86c120c366c2c Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 16 Feb 2019 22:06:23 +0100 Subject: Handle impl generics in method calls --- .../ty/snapshots/tests__infer_generic_chain.snap | 54 +++++++++++----------- .../ty/snapshots/tests__infer_impl_generics.snap | 40 ++++++++-------- 2 files changed, 47 insertions(+), 47 deletions(-) (limited to 'crates/ra_hir/src/ty') diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_generic_chain.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_generic_chain.snap index 626f31252..d1ce87b0a 100644 --- a/crates/ra_hir/src/ty/snapshots/tests__infer_generic_chain.snap +++ b/crates/ra_hir/src/ty/snapshots/tests__infer_generic_chain.snap @@ -1,36 +1,36 @@ --- -created: "2019-01-27T14:52:29.938713255+00:00" -creator: insta@0.5.2 -expression: "&result" +created: "2019-02-16T20:53:59.655361804Z" +creator: insta@0.6.2 source: crates/ra_hir/src/ty/tests.rs +expression: "&result" --- -[53; 57) 'self': A<[unknown]> -[65; 87) '{ ... }': [unknown] -[75; 79) 'self': A<[unknown]> -[75; 81) 'self.x': [unknown] +[53; 57) 'self': A +[65; 87) '{ ... }': T2 +[75; 79) 'self': A +[75; 81) 'self.x': T2 [99; 100) 't': T [110; 115) '{ t }': T [112; 113) 't': T [135; 261) '{ ....x() }': i128 -[146; 147) 'x': i32 -[150; 151) '1': i32 -[162; 163) 'y': i32 -[166; 168) 'id': fn id(T) -> T -[166; 171) 'id(x)': i32 -[169; 170) 'x': i32 -[182; 183) 'a': A -[186; 200) 'A { x: id(y) }': A -[193; 195) 'id': fn id(T) -> T -[193; 198) 'id(y)': i32 -[196; 197) 'y': i32 -[211; 212) 'z': i32 -[215; 217) 'id': fn id(T) -> T -[215; 222) 'id(a.x)': i32 -[218; 219) 'a': A -[218; 221) 'a.x': i32 -[233; 234) 'b': A -[237; 247) 'A { x: z }': A -[244; 245) 'z': i32 -[254; 255) 'b': A +[146; 147) 'x': i128 +[150; 151) '1': i128 +[162; 163) 'y': i128 +[166; 168) 'id': fn id(T) -> T +[166; 171) 'id(x)': i128 +[169; 170) 'x': i128 +[182; 183) 'a': A +[186; 200) 'A { x: id(y) }': A +[193; 195) 'id': fn id(T) -> T +[193; 198) 'id(y)': i128 +[196; 197) 'y': i128 +[211; 212) 'z': i128 +[215; 217) 'id': fn id(T) -> T +[215; 222) 'id(a.x)': i128 +[218; 219) 'a': A +[218; 221) 'a.x': i128 +[233; 234) 'b': A +[237; 247) 'A { x: z }': A +[244; 245) 'z': i128 +[254; 255) 'b': A [254; 259) 'b.x()': i128 diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_impl_generics.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_impl_generics.snap index 99df39fc2..eabbe52fd 100644 --- a/crates/ra_hir/src/ty/snapshots/tests__infer_impl_generics.snap +++ b/crates/ra_hir/src/ty/snapshots/tests__infer_impl_generics.snap @@ -1,25 +1,25 @@ --- -created: "2019-02-16T19:27:11.573533475Z" +created: "2019-02-16T20:53:59.657979128Z" creator: insta@0.6.2 source: crates/ra_hir/src/ty/tests.rs expression: "&result" --- -[74; 78) 'self': A<[unknown], [unknown]> -[85; 107) '{ ... }': [unknown] -[95; 99) 'self': A<[unknown], [unknown]> -[95; 101) 'self.x': [unknown] -[117; 121) 'self': A<[unknown], [unknown]> -[128; 150) '{ ... }': [unknown] -[138; 142) 'self': A<[unknown], [unknown]> -[138; 144) 'self.y': [unknown] -[163; 167) 'self': A<[unknown], [unknown]> +[74; 78) 'self': A +[85; 107) '{ ... }': X +[95; 99) 'self': A +[95; 101) 'self.x': X +[117; 121) 'self': A +[128; 150) '{ ... }': Y +[138; 142) 'self': A +[138; 144) 'self.y': Y +[163; 167) 'self': A [169; 170) 't': T -[188; 223) '{ ... }': ([unknown], [unknown], T) -[198; 217) '(self.....y, t)': ([unknown], [unknown], T) -[199; 203) 'self': A<[unknown], [unknown]> -[199; 205) 'self.x': [unknown] -[207; 211) 'self': A<[unknown], [unknown]> -[207; 213) 'self.y': [unknown] +[188; 223) '{ ... }': (X, Y, T) +[198; 217) '(self.....y, t)': (X, Y, T) +[199; 203) 'self': A +[199; 205) 'self.x': X +[207; 211) 'self': A +[207; 213) 'self.y': Y [215; 216) 't': T [245; 342) '{ ...(1); }': () [255; 256) 'a': A @@ -27,13 +27,13 @@ expression: "&result" [266; 270) '1u64': u64 [275; 279) '1i64': i64 [287; 288) 'a': A -[287; 292) 'a.x()': [unknown] +[287; 292) 'a.x()': u64 [298; 299) 'a': A -[298; 303) 'a.y()': [unknown] +[298; 303) 'a.y()': i64 [309; 310) 'a': A -[309; 319) 'a.z(1i128)': ([unknown], [unknown], i128) +[309; 319) 'a.z(1i128)': (u64, i64, i128) [313; 318) '1i128': i128 [325; 326) 'a': A -[325; 339) 'a.z::(1)': ([unknown], [unknown], i32) +[325; 339) 'a.z::(1)': (u64, i64, i32) [337; 338) '1': i32 -- cgit v1.2.3