1
1
error: call to unsafe function is unsafe and requires unsafe block (error E0133)
2
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:9 :5
2
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:12 :5
3
3
|
4
4
LL | unsf();
5
5
| ^^^^^^ call to unsafe function
6
6
|
7
7
note: the lint level is defined here
8
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:1 :9
8
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:4 :9
9
9
|
10
10
LL | #![deny(unsafe_op_in_unsafe_fn)]
11
11
| ^^^^^^^^^^^^^^^^^^^^^^
12
12
= note: consult the function's documentation for information on how to avoid undefined behavior
13
13
14
14
error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
15
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:11 :5
15
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:14 :5
16
16
|
17
17
LL | *PTR;
18
18
| ^^^^ dereference of raw pointer
19
19
|
20
20
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
21
21
22
22
error: use of mutable static is unsafe and requires unsafe block (error E0133)
23
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:13 :5
23
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:16 :5
24
24
|
25
25
LL | VOID = ();
26
26
| ^^^^^^^^^ use of mutable static
27
27
|
28
28
= note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
29
29
30
30
error: unnecessary `unsafe` block
31
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:16 :5
31
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:19 :5
32
32
|
33
33
LL | unsafe {}
34
34
| ^^^^^^ unnecessary `unsafe` block
35
35
|
36
36
note: the lint level is defined here
37
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:2 :9
37
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:5 :9
38
38
|
39
39
LL | #![deny(unused_unsafe)]
40
40
| ^^^^^^^^^^^^^
41
41
42
42
error: call to unsafe function is unsafe and requires unsafe block (error E0133)
43
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:24 :5
43
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:27 :5
44
44
|
45
45
LL | unsf();
46
46
| ^^^^^^ call to unsafe function
47
47
|
48
48
note: the lint level is defined here
49
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:22 :8
49
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:25 :8
50
50
|
51
51
LL | #[deny(warnings)]
52
52
| ^^^^^^^^
53
53
= note: `#[deny(unsafe_op_in_unsafe_fn)]` implied by `#[deny(warnings)]`
54
54
= note: consult the function's documentation for information on how to avoid undefined behavior
55
55
56
56
error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
57
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:26 :5
57
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:29 :5
58
58
|
59
59
LL | *PTR;
60
60
| ^^^^ dereference of raw pointer
61
61
|
62
62
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
63
63
64
64
error: use of mutable static is unsafe and requires unsafe block (error E0133)
65
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:28 :5
65
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:31 :5
66
66
|
67
67
LL | VOID = ();
68
68
| ^^^^^^^^^ use of mutable static
69
69
|
70
70
= note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
71
71
72
72
error: unnecessary `unsafe` block
73
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:30 :5
73
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:33 :5
74
74
|
75
75
LL | unsafe {}
76
76
| ^^^^^^ unnecessary `unsafe` block
77
77
78
78
error: unnecessary `unsafe` block
79
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:44 :14
79
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:47 :14
80
80
|
81
81
LL | unsafe { unsafe { unsf() } }
82
82
| ------ ^^^^^^ unnecessary `unsafe` block
83
83
| |
84
84
| because it's nested under this `unsafe` block
85
85
86
86
error: unnecessary `unsafe` block
87
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:55 :5
87
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:58 :5
88
88
|
89
89
LL | unsafe fn allow_level() {
90
90
| ----------------------- because it's nested under this `unsafe` fn
@@ -93,7 +93,7 @@ LL | unsafe { unsf() }
93
93
| ^^^^^^ unnecessary `unsafe` block
94
94
95
95
error: unnecessary `unsafe` block
96
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:67 :9
96
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:70 :9
97
97
|
98
98
LL | unsafe fn nested_allow_level() {
99
99
| ------------------------------ because it's nested under this `unsafe` fn
@@ -102,15 +102,15 @@ LL | unsafe { unsf() }
102
102
| ^^^^^^ unnecessary `unsafe` block
103
103
104
104
error[E0133]: call to unsafe function is unsafe and requires unsafe block
105
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:73 :5
105
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:76 :5
106
106
|
107
107
LL | unsf();
108
108
| ^^^^^^ call to unsafe function
109
109
|
110
110
= note: consult the function's documentation for information on how to avoid undefined behavior
111
111
112
112
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
113
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:77 :9
113
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:80 :9
114
114
|
115
115
LL | unsf();
116
116
| ^^^^^^ call to unsafe function
0 commit comments