summaryrefslogtreecommitdiffstats
path: root/src/test/ui/span/lint-unused-unsafe-thir.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/span/lint-unused-unsafe-thir.stderr')
-rw-r--r--src/test/ui/span/lint-unused-unsafe-thir.stderr66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/test/ui/span/lint-unused-unsafe-thir.stderr b/src/test/ui/span/lint-unused-unsafe-thir.stderr
new file mode 100644
index 000000000..6654910c5
--- /dev/null
+++ b/src/test/ui/span/lint-unused-unsafe-thir.stderr
@@ -0,0 +1,66 @@
+error: unnecessary `unsafe` block
+ --> $DIR/lint-unused-unsafe-thir.rs:21:13
+ |
+LL | fn bad1() { unsafe {} }
+ | ^^^^^^ unnecessary `unsafe` block
+ |
+note: the lint level is defined here
+ --> $DIR/lint-unused-unsafe-thir.rs:9:9
+ |
+LL | #![deny(unused_unsafe)]
+ | ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+ --> $DIR/lint-unused-unsafe-thir.rs:22:13
+ |
+LL | fn bad2() { unsafe { bad1() } }
+ | ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+ --> $DIR/lint-unused-unsafe-thir.rs:23:20
+ |
+LL | unsafe fn bad3() { unsafe {} }
+ | ---------------- ^^^^^^ unnecessary `unsafe` block
+ | |
+ | because it's nested under this `unsafe` fn
+
+error: unnecessary `unsafe` block
+ --> $DIR/lint-unused-unsafe-thir.rs:24:13
+ |
+LL | fn bad4() { unsafe { callback(||{}) } }
+ | ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+ --> $DIR/lint-unused-unsafe-thir.rs:25:20
+ |
+LL | unsafe fn bad5() { unsafe { unsf() } }
+ | ---------------- ^^^^^^ unnecessary `unsafe` block
+ | |
+ | because it's nested under this `unsafe` fn
+
+error: unnecessary `unsafe` block
+ --> $DIR/lint-unused-unsafe-thir.rs:28:9
+ |
+LL | unsafe { // don't put the warning here
+ | ------ because it's nested under this `unsafe` block
+LL | unsafe {
+ | ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+ --> $DIR/lint-unused-unsafe-thir.rs:35:9
+ |
+LL | unsafe {
+ | ------ because it's nested under this `unsafe` block
+LL | unsafe {
+ | ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+ --> $DIR/lint-unused-unsafe-thir.rs:34:5
+ |
+LL | unsafe fn bad7() {
+ | ---------------- because it's nested under this `unsafe` fn
+LL | unsafe {
+ | ^^^^^^ unnecessary `unsafe` block
+
+error: aborting due to 8 previous errors
+