aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests.rs
diff options
context:
space:
mode:
authorPaul Daniel Faria <[email protected]>2020-05-27 13:51:08 +0100
committerPaul Daniel Faria <[email protected]>2020-06-27 15:10:26 +0100
commit9ce44be2ab7e9a99eece1c2e254f15ad1c6d73c5 (patch)
tree904c2c860ff62242bb01af23ea662c70cbe1152f /crates/ra_hir_ty/src/tests.rs
parentb9569886a915f2411adaecbcad28eda8b163c3e3 (diff)
Address review comments, have MissingUnsafe diagnostic point to each unsafe use, update tests
Diffstat (limited to 'crates/ra_hir_ty/src/tests.rs')
-rw-r--r--crates/ra_hir_ty/src/tests.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs
index 4bc2e8b27..26b3aeb50 100644
--- a/crates/ra_hir_ty/src/tests.rs
+++ b/crates/ra_hir_ty/src/tests.rs
@@ -552,7 +552,7 @@ fn missing_unsafe() {
552 .diagnostics() 552 .diagnostics()
553 .0; 553 .0;
554 554
555 assert_snapshot!(diagnostics, @r#""fn missing_unsafe() {\n let x = &5 as *const usize;\n let y = *x;\n}": Missing unsafe keyword on fn"#); 555 assert_snapshot!(diagnostics, @r#""*x": This operation is unsafe and requires an unsafe function or block"#);
556} 556}
557 557
558#[test] 558#[test]
@@ -573,7 +573,7 @@ fn missing_unsafe() {
573 .diagnostics() 573 .diagnostics()
574 .0; 574 .0;
575 575
576 assert_snapshot!(diagnostics, @r#""fn missing_unsafe() {\n unsafe_fn();\n}": Missing unsafe keyword on fn"#); 576 assert_snapshot!(diagnostics, @r#""unsafe_fn()": This operation is unsafe and requires an unsafe function or block"#);
577} 577}
578 578
579#[test] 579#[test]
@@ -599,7 +599,7 @@ fn missing_unsafe() {
599 .diagnostics() 599 .diagnostics()
600 .0; 600 .0;
601 601
602 assert_snapshot!(diagnostics, @r#""fn missing_unsafe() {\n HasUnsafe.unsafe_fn();\n}": Missing unsafe keyword on fn"#); 602 assert_snapshot!(diagnostics, @r#""HasUnsafe.unsafe_fn()": This operation is unsafe and requires an unsafe function or block"#);
603} 603}
604 604
605#[test] 605#[test]