From aa06893a1493770f8009d098a5340f1a9ba13dec Mon Sep 17 00:00:00 2001 From: Marcus Klaas de Vries Date: Sat, 26 Jan 2019 00:30:56 +0100 Subject: Add type params to FnSignature --- .../src/ty/snapshots/tests__infer_backwards.snap | 8 ++-- .../src/ty/snapshots/tests__infer_binary_op.snap | 8 ++-- .../snapshots/tests__infer_function_generics.snap | 30 ++++++------- .../ty/snapshots/tests__infer_generic_chain.snap | 52 +++++++++++----------- .../src/ty/snapshots/tests__infer_paths.snap | 10 ++--- 5 files changed, 54 insertions(+), 54 deletions(-) (limited to 'crates/ra_hir/src/ty/snapshots') diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_backwards.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_backwards.snap index 5c74bd8c7..e6b39f151 100644 --- a/crates/ra_hir/src/ty/snapshots/tests__infer_backwards.snap +++ b/crates/ra_hir/src/ty/snapshots/tests__infer_backwards.snap @@ -1,8 +1,8 @@ --- -created: "2019-01-22T14:44:59.880187500+00:00" -creator: insta@0.4.0 +created: "2019-01-25T23:18:54.943309491+00:00" +creator: insta@0.5.2 expression: "&result" -source: "crates\\ra_hir\\src\\ty\\tests.rs" +source: crates/ra_hir/src/ty/tests.rs --- [14; 15) 'x': u32 [22; 24) '{}': () @@ -10,7 +10,7 @@ source: "crates\\ra_hir\\src\\ty\\tests.rs" [88; 89) 'a': u32 [92; 108) 'unknow...nction': [unknown] [92; 110) 'unknow...tion()': u32 -[116; 125) 'takes_u32': fn(u32) -> () +[116; 125) 'takes_u32': fn takes_u32 [116; 128) 'takes_u32(a)': () [126; 127) 'a': u32 [138; 139) 'b': i32 diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_binary_op.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_binary_op.snap index c506bcadd..895c13ae6 100644 --- a/crates/ra_hir/src/ty/snapshots/tests__infer_binary_op.snap +++ b/crates/ra_hir/src/ty/snapshots/tests__infer_binary_op.snap @@ -1,8 +1,8 @@ --- -created: "2019-01-22T14:44:59.880187500+00:00" -creator: insta@0.4.0 +created: "2019-01-25T23:18:54.949540810+00:00" +creator: insta@0.5.2 expression: "&result" -source: "crates\\ra_hir\\src\\ty\\tests.rs" +source: crates/ra_hir/src/ty/tests.rs --- [6; 7) 'x': bool [22; 34) '{ 0i32 }': i32 @@ -28,7 +28,7 @@ source: "crates\\ra_hir\\src\\ty\\tests.rs" [174; 196) 'minus_...ONST_2': bool [189; 196) 'CONST_2': isize [206; 207) 'c': i32 -[210; 211) 'f': fn(bool) -> i32 +[210; 211) 'f': fn f [210; 219) 'f(z || y)': i32 [210; 223) 'f(z || y) + 5': i32 [212; 213) 'z': bool diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_function_generics.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_function_generics.snap index 7203ad1e2..efe0e7adf 100644 --- a/crates/ra_hir/src/ty/snapshots/tests__infer_function_generics.snap +++ b/crates/ra_hir/src/ty/snapshots/tests__infer_function_generics.snap @@ -1,21 +1,21 @@ --- -created: "2019-01-22T14:44:59.954958500+00:00" -creator: insta@0.4.0 +created: "2019-01-25T23:18:54.962273460+00:00" +creator: insta@0.5.2 expression: "&result" -source: "crates\\ra_hir\\src\\ty\\tests.rs" +source: crates/ra_hir/src/ty/tests.rs --- -[10; 11) 't': [unknown] -[21; 26) '{ t }': [unknown] -[23; 24) 't': [unknown] +[10; 11) 't': T +[21; 26) '{ t }': T +[23; 24) 't': T [38; 98) '{ ...(1); }': () -[44; 46) 'id': fn(T) -> T -[44; 52) 'id(1u32)': T +[44; 46) 'id': fn id +[44; 52) 'id(1u32)': u32 [47; 51) '1u32': u32 -[58; 68) 'id::': fn(T) -> T -[58; 71) 'id::(1)': T -[69; 70) '1': T -[81; 82) 'x': T -[90; 92) 'id': fn(T) -> T -[90; 95) 'id(1)': T -[93; 94) '1': T +[58; 68) 'id::': fn id +[58; 71) 'id::(1)': i32 +[69; 70) '1': i32 +[81; 82) 'x': u64 +[90; 92) 'id': fn id +[90; 95) 'id(1)': u64 +[93; 94) '1': u64 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 4435180a1..aaf8ccea5 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-22T14:44:59.961936900+00:00" -creator: insta@0.4.0 +created: "2019-01-25T23:18:54.978506051+00:00" +creator: insta@0.5.2 expression: "&result" -source: "crates\\ra_hir\\src\\ty\\tests.rs" +source: crates/ra_hir/src/ty/tests.rs --- [53; 57) 'self': A<[unknown]> [65; 87) '{ ... }': [unknown] [75; 79) 'self': A<[unknown]> [75; 81) 'self.x': [unknown] -[99; 100) 't': [unknown] -[110; 115) '{ t }': [unknown] -[112; 113) 't': [unknown] +[99; 100) 't': T +[110; 115) '{ t }': T +[112; 113) 't': T [135; 261) '{ ....x() }': i128 -[146; 147) 'x': T -[150; 151) '1': T -[162; 163) 'y': T -[166; 168) 'id': fn(T) -> T -[166; 171) 'id(x)': T -[169; 170) 'x': T -[182; 183) 'a': A -[186; 200) 'A { x: id(y) }': A -[193; 195) 'id': fn(T) -> T -[193; 198) 'id(y)': T -[196; 197) 'y': T -[211; 212) 'z': T -[215; 217) 'id': fn(T) -> T -[215; 222) 'id(a.x)': T -[218; 219) 'a': A -[218; 221) 'a.x': T -[233; 234) 'b': A -[237; 247) 'A { x: z }': A -[244; 245) 'z': T -[254; 255) 'b': A +[146; 147) 'x': i32 +[150; 151) '1': i32 +[162; 163) 'y': i32 +[166; 168) 'id': fn id +[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 +[193; 198) 'id(y)': i32 +[196; 197) 'y': i32 +[211; 212) 'z': i32 +[215; 217) 'id': fn id +[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 [254; 259) 'b.x()': i128 diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_paths.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_paths.snap index 0bceffaef..efca36058 100644 --- a/crates/ra_hir/src/ty/snapshots/tests__infer_paths.snap +++ b/crates/ra_hir/src/ty/snapshots/tests__infer_paths.snap @@ -1,16 +1,16 @@ --- -created: "2019-01-22T14:44:59.975899500+00:00" -creator: insta@0.4.0 +created: "2019-01-25T23:18:54.985011010+00:00" +creator: insta@0.5.2 expression: "&result" -source: "crates\\ra_hir\\src\\ty\\tests.rs" +source: crates/ra_hir/src/ty/tests.rs --- [15; 20) '{ 1 }': u32 [17; 18) '1': u32 [48; 53) '{ 1 }': u32 [50; 51) '1': u32 [67; 91) '{ ...c(); }': () -[73; 74) 'a': fn() -> u32 +[73; 74) 'a': fn a [73; 76) 'a()': u32 -[82; 86) 'b::c': fn() -> u32 +[82; 86) 'b::c': fn c [82; 88) 'b::c()': u32 -- cgit v1.2.3