aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src')
-rw-r--r--crates/ra_hir_ty/src/diagnostics.rs3
-rw-r--r--crates/ra_hir_ty/src/diagnostics/match_check.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs
index 3016ca3bd..3870c6d9c 100644
--- a/crates/ra_hir_ty/src/diagnostics.rs
+++ b/crates/ra_hir_ty/src/diagnostics.rs
@@ -261,8 +261,7 @@ fn check_diagnostics(ra_fixture: &str) {
261 // FXIME: macros... 261 // FXIME: macros...
262 let file_id = d.source().file_id.original_file(&db); 262 let file_id = d.source().file_id.original_file(&db);
263 let range = d.syntax_node(&db).text_range(); 263 let range = d.syntax_node(&db).text_range();
264 // FIXME: support multi-line messages in annotations 264 let message = d.message().to_owned();
265 let message = d.message().lines().next().unwrap().to_owned();
266 actual.entry(file_id).or_default().push((range, message)); 265 actual.entry(file_id).or_default().push((range, message));
267 }); 266 });
268 actual.values_mut().for_each(|diags| diags.sort_by_key(|it| it.0.start())); 267 actual.values_mut().for_each(|diags| diags.sort_by_key(|it| it.0.start()));
diff --git a/crates/ra_hir_ty/src/diagnostics/match_check.rs b/crates/ra_hir_ty/src/diagnostics/match_check.rs
index ba48b51b5..95f272811 100644
--- a/crates/ra_hir_ty/src/diagnostics/match_check.rs
+++ b/crates/ra_hir_ty/src/diagnostics/match_check.rs
@@ -1162,12 +1162,14 @@ fn main() {
1162 match a { 1162 match a {
1163 Either::A { } => (), 1163 Either::A { } => (),
1164 //^^^ Missing structure fields: 1164 //^^^ Missing structure fields:
1165 // | - foo
1165 Either::B => (), 1166 Either::B => (),
1166 } 1167 }
1167 match a { 1168 match a {
1168 //^ Missing match arm 1169 //^ Missing match arm
1169 Either::A { } => (), 1170 Either::A { } => (),
1170 } //^^^ Missing structure fields: 1171 } //^^^ Missing structure fields:
1172 // | - foo
1171 1173
1172 match a { 1174 match a {
1173 Either::A { foo: true } => (), 1175 Either::A { foo: true } => (),