summaryrefslogtreecommitdiffstats
path: root/tests/ui/span/lint-unused-unsafe-thir.stderr
blob: 3bcbb759775aac879dc2cc2a4c157f5442b30309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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: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: aborting due to 6 previous errors