--- /dev/null
+error: unnecessary `unsafe` block
+ --> $DIR/issue-48131.rs:12:9
+ |
+LL | unsafe { /* unnecessary */ }
+ | ^^^^^^ unnecessary `unsafe` block
+ |
+note: the lint level is defined here
+ --> $DIR/issue-48131.rs:6:9
+ |
+LL | #![deny(unused_unsafe)]
+ | ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+ --> $DIR/issue-48131.rs:23:13
+ |
+LL | unsafe { /* unnecessary */ }
+ | ^^^^^^ unnecessary `unsafe` block
+
+error: aborting due to 2 previous errors
+
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
// This note is annotated because the purpose of the test
// is to ensure that certain other notes are not generated.
#![deny(unused_unsafe)] //~ NOTE
+++ /dev/null
-error: unnecessary `unsafe` block
- --> $DIR/issue-48131.rs:9:9
- |
-LL | unsafe { /* unnecessary */ }
- | ^^^^^^ unnecessary `unsafe` block
- |
-note: the lint level is defined here
- --> $DIR/issue-48131.rs:3:9
- |
-LL | #![deny(unused_unsafe)]
- | ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
- --> $DIR/issue-48131.rs:20:13
- |
-LL | unsafe { /* unnecessary */ }
- | ^^^^^^ unnecessary `unsafe` block
-
-error: aborting due to 2 previous errors
-
--- /dev/null
+error: unnecessary `unsafe` block
+ --> $DIR/issue-48131.rs:12:9
+ |
+LL | unsafe { /* unnecessary */ }
+ | ^^^^^^ unnecessary `unsafe` block
+ |
+note: the lint level is defined here
+ --> $DIR/issue-48131.rs:6:9
+ |
+LL | #![deny(unused_unsafe)]
+ | ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+ --> $DIR/issue-48131.rs:23:13
+ |
+LL | unsafe { /* unnecessary */ }
+ | ^^^^^^ unnecessary `unsafe` block
+
+error: aborting due to 2 previous errors
+
--- /dev/null
+error: unnecessary `unsafe` block
+ --> $DIR/unsafe-around-compiler-generated-unsafe.rs:9:5
+ |
+LL | unsafe { println!("foo"); }
+ | ^^^^^^ unnecessary `unsafe` block
+ |
+note: the lint level is defined here
+ --> $DIR/unsafe-around-compiler-generated-unsafe.rs:6:9
+ |
+LL | #![deny(unused_unsafe)]
+ | ^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
// issue #12418
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
#![deny(unused_unsafe)]
fn main() {
+++ /dev/null
-error: unnecessary `unsafe` block
- --> $DIR/unsafe-around-compiler-generated-unsafe.rs:6:5
- |
-LL | unsafe { println!("foo"); }
- | ^^^^^^ unnecessary `unsafe` block
- |
-note: the lint level is defined here
- --> $DIR/unsafe-around-compiler-generated-unsafe.rs:3:9
- |
-LL | #![deny(unused_unsafe)]
- | ^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
--- /dev/null
+error: unnecessary `unsafe` block
+ --> $DIR/unsafe-around-compiler-generated-unsafe.rs:9:5
+ |
+LL | unsafe { println!("foo"); }
+ | ^^^^^^ unnecessary `unsafe` block
+ |
+note: the lint level is defined here
+ --> $DIR/unsafe-around-compiler-generated-unsafe.rs:6:9
+ |
+LL | #![deny(unused_unsafe)]
+ | ^^^^^^^^^^^^^
+
+error: aborting due to previous error
+