1
- error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
1
+ error: call to unsafe function is unsafe and requires unsafe block (error E0133)
2
2
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:12:5
3
3
|
4
4
LL | unsf();
@@ -12,23 +12,23 @@ LL | #![deny(unsafe_op_in_unsafe_fn)]
12
12
| ^^^^^^^^^^^^^^^^^^^^^^
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:15 :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:17 :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:20 :5
31
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:19 :5
32
32
|
33
33
LL | unsafe {}
34
34
| ^^^^^^ unnecessary `unsafe` block
@@ -39,60 +39,60 @@ note: the lint level is defined here
39
39
LL | #![deny(unused_unsafe)]
40
40
| ^^^^^^^^^^^^^
41
41
42
- error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
43
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:28 :5
42
+ error: call to unsafe function is unsafe and requires unsafe block (error E0133)
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: consult the function's documentation for information on how to avoid undefined behavior
49
49
note: the lint level is defined here
50
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:26 :8
50
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:25 :8
51
51
|
52
52
LL | #[deny(warnings)]
53
53
| ^^^^^^^^
54
54
= note: `#[deny(unsafe_op_in_unsafe_fn)]` implied by `#[deny(warnings)]`
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:31 :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:33 :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:35 :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:49 :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[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
87
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:76 :5
87
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:74 :5
88
88
|
89
89
LL | unsf();
90
90
| ^^^^^^ call to unsafe function
91
91
|
92
92
= note: consult the function's documentation for information on how to avoid undefined behavior
93
93
94
94
error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe function or block
95
- --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:81 :9
95
+ --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:79 :9
96
96
|
97
97
LL | unsf();
98
98
| ^^^^^^ call to unsafe function
0 commit comments