aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model_api.rs16
-rw-r--r--crates/ra_hir/src/code_model_impl/function.rs1
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__bug_484.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__bug_585.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_adt_pattern.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_array.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_backwards.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_basics.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_binary_op.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_enum.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_field_autoderef.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_function_generics.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_generic_chain.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_generics_in_patterns.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_inherent_method.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_let.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_literals.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_paths.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_pattern.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_refs.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_self.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_struct_generics.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_tuple.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_unary_op.snap10
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__no_panic_on_field_of_enum.snap10
26 files changed, 160 insertions, 97 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs
index 88eda5ed0..9ae620efd 100644
--- a/crates/ra_hir/src/code_model_api.rs
+++ b/crates/ra_hir/src/code_model_api.rs
@@ -2,7 +2,7 @@ use std::sync::Arc;
2 2
3use relative_path::RelativePathBuf; 3use relative_path::RelativePathBuf;
4use ra_db::{CrateId, FileId}; 4use ra_db::{CrateId, FileId};
5use ra_syntax::{ast, TreeArc, SyntaxNode}; 5use ra_syntax::{ast::{self, AstNode, DocCommentsOwner}, TreeArc, SyntaxNode};
6 6
7use crate::{ 7use crate::{
8 Name, DefId, Path, PerNs, ScopesWithSyntaxMapping, Ty, HirFileId, 8 Name, DefId, Path, PerNs, ScopesWithSyntaxMapping, Ty, HirFileId,
@@ -352,6 +352,20 @@ impl Function {
352 pub fn generic_params(&self, db: &impl HirDatabase) -> Arc<GenericParams> { 352 pub fn generic_params(&self, db: &impl HirDatabase) -> Arc<GenericParams> {
353 db.generic_params(self.def_id) 353 db.generic_params(self.def_id)
354 } 354 }
355
356 pub fn docs(&self, db: &impl HirDatabase) -> Option<String> {
357 let def_loc = self.def_id.loc(db);
358 let syntax = db.file_item(def_loc.source_item_id);
359 let fn_def = ast::FnDef::cast(&syntax).expect("fn def should point to FnDef node");
360
361 // doc_comment_text unconditionally returns a String
362 let comments = fn_def.doc_comment_text();
363 if comments.is_empty() {
364 None
365 } else {
366 Some(comments)
367 }
368 }
355} 369}
356 370
357#[derive(Debug, Clone, PartialEq, Eq, Hash)] 371#[derive(Debug, Clone, PartialEq, Eq, Hash)]
diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs
index 66d7e1713..c68c6bfbf 100644
--- a/crates/ra_hir/src/code_model_impl/function.rs
+++ b/crates/ra_hir/src/code_model_impl/function.rs
@@ -72,6 +72,7 @@ impl FnSignature {
72 } else { 72 } else {
73 TypeRef::unit() 73 TypeRef::unit()
74 }; 74 };
75
75 let sig = FnSignature { 76 let sig = FnSignature {
76 name, 77 name,
77 params, 78 params,
diff --git a/crates/ra_hir/src/ty/snapshots/tests__bug_484.snap b/crates/ra_hir/src/ty/snapshots/tests__bug_484.snap
index eeb3061d3..28f57623d 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__bug_484.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__bug_484.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.662863951+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.880187500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[11; 37) '{ l... {}; }': () 7[11; 37) '{ l... {}; }': ()
6[20; 21) 'x': () 8[20; 21) 'x': ()
7[24; 34) 'if true {}': () 9[24; 34) 'if true {}': ()
diff --git a/crates/ra_hir/src/ty/snapshots/tests__bug_585.snap b/crates/ra_hir/src/ty/snapshots/tests__bug_585.snap
index 073009bbc..e7b42e413 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__bug_585.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__bug_585.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.662863969+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.880187500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[11; 89) '{ ... } }': () 7[11; 89) '{ ... } }': ()
6[17; 21) 'X {}': [unknown] 8[17; 21) 'X {}': [unknown]
7[27; 87) 'match ... }': () 9[27; 87) 'match ... }': ()
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_adt_pattern.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_adt_pattern.snap
index fb261f1c0..2719f592e 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_adt_pattern.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_adt_pattern.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.662935249+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.880187500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[68; 262) '{ ... d; }': () 7[68; 262) '{ ... d; }': ()
6[78; 79) 'e': E 8[78; 79) 'e': E
7[82; 95) 'E::A { x: 3 }': E 9[82; 95) 'E::A { x: 3 }': E
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_array.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_array.snap
index 2fc613e26..3f2faa598 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_array.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_array.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.662961921+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.880187500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[9; 10) 'x': &str 7[9; 10) 'x': &str
6[18; 19) 'y': isize 8[18; 19) 'y': isize
7[28; 293) '{ ... []; }': () 9[28; 293) '{ ... []; }': ()
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 12f0d8c90..5c74bd8c7 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_backwards.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_backwards.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.662902243+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.880187500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[14; 15) 'x': u32 7[14; 15) 'x': u32
6[22; 24) '{}': () 8[22; 24) '{}': ()
7[78; 231) '{ ...t &c }': &mut &f64 9[78; 231) '{ ...t &c }': &mut &f64
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_basics.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_basics.snap
index eba8126e9..4b0863558 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_basics.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_basics.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.662874226+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.880187500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[9; 10) 'a': u32 7[9; 10) 'a': u32
6[17; 18) 'b': isize 8[17; 18) 'b': isize
7[27; 28) 'c': ! 9[27; 28) 'c': !
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 3b750ec45..c506bcadd 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,7 +1,9 @@
1Created: 2019-01-21T21:48:20.662972146+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.880187500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[6; 7) 'x': bool 7[6; 7) 'x': bool
6[22; 34) '{ 0i32 }': i32 8[22; 34) '{ 0i32 }': i32
7[28; 32) '0i32': i32 9[28; 32) '0i32': i32
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_enum.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_enum.snap
index 8018ff025..bc8b84272 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_enum.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_enum.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.662949719+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.880187500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[48; 82) '{ E:...:V2; }': () 7[48; 82) '{ E:...:V2; }': ()
6[52; 70) 'E::V1 ...d: 1 }': E 8[52; 70) 'E::V1 ...d: 1 }': E
7[67; 68) '1': u32 9[67; 68) '1': u32
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_field_autoderef.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_field_autoderef.snap
index 1943ef079..f092fd319 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_field_autoderef.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_field_autoderef.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.671554939+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.955954900+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[44; 45) 'a': A 7[44; 45) 'a': A
6[50; 213) '{ ...5.b; }': () 8[50; 213) '{ ...5.b; }': ()
7[60; 62) 'a1': A 9[60; 62) 'a1': A
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 386acc0b3..7203ad1e2 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,7 +1,9 @@
1Created: 2019-01-21T21:48:20.669112954+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.954958500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[10; 11) 't': [unknown] 7[10; 11) 't': [unknown]
6[21; 26) '{ t }': [unknown] 8[21; 26) '{ t }': [unknown]
7[23; 24) 't': [unknown] 9[23; 24) 't': [unknown]
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 7a64e4f95..4435180a1 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,7 +1,9 @@
1Created: 2019-01-21T21:48:20.672467086+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.961936900+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[53; 57) 'self': A<[unknown]> 7[53; 57) 'self': A<[unknown]>
6[65; 87) '{ ... }': [unknown] 8[65; 87) '{ ... }': [unknown]
7[75; 79) 'self': A<[unknown]> 9[75; 79) 'self': A<[unknown]>
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_generics_in_patterns.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_generics_in_patterns.snap
index ae38ec2fb..fae7ab0dd 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_generics_in_patterns.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_generics_in_patterns.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.683908196+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.970913200+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[79; 81) 'a1': A<u32> 7[79; 81) 'a1': A<u32>
6[91; 92) 'o': Option<u64> 8[91; 92) 'o': Option<u64>
7[107; 244) '{ ... }; }': () 9[107; 244) '{ ... }; }': ()
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_inherent_method.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_inherent_method.snap
index 298dac585..b3c706aca 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_inherent_method.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_inherent_method.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.670255659+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.968918800+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[32; 36) 'self': A 7[32; 36) 'self': A
6[38; 39) 'x': u32 8[38; 39) 'x': u32
7[53; 55) '{}': () 9[53; 55) '{}': ()
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_let.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_let.snap
index aa4e4cc63..0d085071a 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_let.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_let.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.666406651+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.963931700+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[11; 71) '{ ...= b; }': () 7[11; 71) '{ ...= b; }': ()
6[21; 22) 'a': isize 8[21; 22) 'a': isize
7[25; 31) '1isize': isize 9[25; 31) '1isize': isize
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_literals.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_literals.snap
index 00c7e639e..e287a100e 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_literals.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_literals.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.666200994+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.974903100+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[11; 201) '{ ...o"#; }': () 7[11; 201) '{ ...o"#; }': ()
6[17; 21) '5i32': i32 8[17; 21) '5i32': i32
7[27; 34) '"hello"': &str 9[27; 34) '"hello"': &str
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 0924cdc80..0bceffaef 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_paths.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_paths.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.671399345+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:44:59.975899500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[15; 20) '{ 1 }': u32 7[15; 20) '{ 1 }': u32
6[17; 18) '1': u32 8[17; 18) '1': u32
7[48; 53) '{ 1 }': u32 9[48; 53) '{ 1 }': u32
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_pattern.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_pattern.snap
index b22b71765..1da46daf8 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_pattern.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_pattern.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.677661229+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:45:00.037734500+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[9; 10) 'x': &i32 7[9; 10) 'x': &i32
6[18; 369) '{ ...o_x; }': () 8[18; 369) '{ ...o_x; }': ()
7[28; 29) 'y': &i32 9[28; 29) 'y': &i32
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_refs.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_refs.snap
index fc5bfe677..56931bb3d 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_refs.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_refs.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.674183006+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:45:00.053692600+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[9; 10) 'a': &u32 7[9; 10) 'a': &u32
6[18; 19) 'b': &mut u32 8[18; 19) 'b': &mut u32
7[31; 32) 'c': *const u32 9[31; 32) 'c': *const u32
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_self.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_self.snap
index 76cb62055..84c8b1e90 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_self.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_self.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:50:17.870325361+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:45:00.052694700+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[34; 38) 'self': &S 7[34; 38) 'self': &S
6[40; 61) '{ ... }': () 8[40; 61) '{ ... }': ()
7[50; 54) 'self': &S 9[50; 54) 'self': &S
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap
index 0c94d6837..c4a2d5cf8 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_struct.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.677495622+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:45:00.058678600+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[72; 154) '{ ...a.c; }': () 7[72; 154) '{ ...a.c; }': ()
6[82; 83) 'c': [unknown] 8[82; 83) 'c': [unknown]
7[86; 87) 'C': [unknown] 9[86; 87) 'C': [unknown]
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_struct_generics.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_struct_generics.snap
index 7cf947d4d..e07c7d36c 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_struct_generics.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_struct_generics.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.678274444+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:45:00.058678600+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[36; 38) 'a1': A<u32> 7[36; 38) 'a1': A<u32>
6[48; 49) 'i': i32 8[48; 49) 'i': i32
7[56; 147) '{ ...3.x; }': () 9[56; 147) '{ ...3.x; }': ()
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_tuple.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_tuple.snap
index 862644145..cd11d41d3 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_tuple.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_tuple.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.676903109+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:45:00.058678600+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[9; 10) 'x': &str 7[9; 10) 'x': &str
6[18; 19) 'y': isize 8[18; 19) 'y': isize
7[28; 170) '{ ...d"); }': () 9[28; 170) '{ ...d"); }': ()
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_unary_op.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_unary_op.snap
index 8906bb9c0..10aa61954 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__infer_unary_op.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_unary_op.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.676213204+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:45:00.059676600+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[27; 28) 'x': SomeType 7[27; 28) 'x': SomeType
6[40; 197) '{ ...lo"; }': () 8[40; 197) '{ ...lo"; }': ()
7[50; 51) 'b': bool 9[50; 51) 'b': bool
diff --git a/crates/ra_hir/src/ty/snapshots/tests__no_panic_on_field_of_enum.snap b/crates/ra_hir/src/ty/snapshots/tests__no_panic_on_field_of_enum.snap
index 024fbf929..b6f404b4c 100644
--- a/crates/ra_hir/src/ty/snapshots/tests__no_panic_on_field_of_enum.snap
+++ b/crates/ra_hir/src/ty/snapshots/tests__no_panic_on_field_of_enum.snap
@@ -1,7 +1,9 @@
1Created: 2019-01-21T21:48:20.676654355+00:00 1---
2Creator: [email protected] 2created: "2019-01-22T14:45:00.058678600+00:00"
3Source: crates/ra_hir/src/ty/tests.rs 3creator: [email protected]
4 4expression: "&result"
5source: "crates\\ra_hir\\src\\ty\\tests.rs"
6---
5[20; 21) 'x': X 7[20; 21) 'x': X
6[26; 47) '{ ...eld; }': () 8[26; 47) '{ ...eld; }': ()
7[32; 33) 'x': X 9[32; 33) 'x': X