You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2025. It is now read-only.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
13
+
= note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
14
+
= note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
15
+
16
+
warning: borrow of packed field is unsafe and requires unsafe block (error E0133)
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
28
+
= note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
29
+
= note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
30
+
31
+
warning: borrow of packed field is unsafe and requires unsafe block (error E0133)
= note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
43
+
44
+
error: borrow of packed field is unsafe and requires unsafe block (error E0133)
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
56
+
= note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
57
+
= note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
58
+
59
+
error: aborting due to previous error; 3 warnings emitted
= 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:20:5
15
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:12: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:22:5
23
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:14: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
-
error: borrow of packed field is unsafe and requires unsafe block (error E0133)
31
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:24:5
32
-
|
33
-
LL | &PACKED.data;
34
-
| ^^^^^^^^^^^^ borrow of packed field
35
-
|
36
-
note: the lint level is defined here
37
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:4:9
38
-
|
39
-
LL | #![deny(safe_packed_borrows)]
40
-
| ^^^^^^^^^^^^^^^^^^^
41
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
42
-
= note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
43
-
= note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
44
-
45
30
error: call to unsafe function is unsafe and requires unsafe block (error E0133)
46
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:33:5
31
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:22:5
47
32
|
48
33
LL | unsf();
49
34
| ^^^^^^ call to unsafe function
50
35
|
51
36
note: the lint level is defined here
52
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:31:8
37
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:20:8
53
38
|
54
39
LL | #[deny(warnings)]
55
40
| ^^^^^^^^
56
41
= note: `#[deny(unsafe_op_in_unsafe_fn)]` implied by `#[deny(warnings)]`
57
42
= note: consult the function's documentation for information on how to avoid undefined behavior
58
43
59
44
error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
60
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:35:5
45
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:24:5
61
46
|
62
47
LL | *PTR;
63
48
| ^^^^ dereference of raw pointer
64
49
|
65
50
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
66
51
67
52
error: use of mutable static is unsafe and requires unsafe block (error E0133)
68
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:37:5
53
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:26:5
69
54
|
70
55
LL | VOID = ();
71
56
| ^^^^^^^^^ use of mutable static
72
57
|
73
58
= note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
74
59
75
-
error: borrow of packed field is unsafe and requires unsafe block (error E0133)
76
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:39:5
77
-
|
78
-
LL | &PACKED.data;
79
-
| ^^^^^^^^^^^^ borrow of packed field
80
-
|
81
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
82
-
= note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
83
-
= note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
84
-
85
60
error: unnecessary `unsafe` block
86
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:55:14
61
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:40:14
87
62
|
88
63
LL | unsafe { unsafe { unsf() } }
89
64
| ------ ^^^^^^ unnecessary `unsafe` block
@@ -96,49 +71,34 @@ note: the lint level is defined here
96
71
LL | #![deny(unused_unsafe)]
97
72
| ^^^^^^^^^^^^^
98
73
99
-
warning: borrow of packed field is unsafe and requires unsafe block (error E0133)
100
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:61:5
101
-
|
102
-
LL | &PACKED.data;
103
-
| ^^^^^^^^^^^^ borrow of packed field
104
-
|
105
-
note: the lint level is defined here
106
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:59:8
107
-
|
108
-
LL | #[warn(safe_packed_borrows)]
109
-
| ^^^^^^^^^^^^^^^^^^^
110
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
111
-
= note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
112
-
= note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
113
-
114
74
error: unnecessary `unsafe` block
115
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:79:5
75
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:51:5
116
76
|
117
77
LL | unsafe { unsf() }
118
78
| ^^^^^^ unnecessary `unsafe` block
119
79
120
80
error: unnecessary `unsafe` block
121
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:92:9
81
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:63:9
122
82
|
123
83
LL | unsafe { unsf() }
124
84
| ^^^^^^ unnecessary `unsafe` block
125
85
126
86
error[E0133]: call to unsafe function is unsafe and requires unsafe block
127
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:98:5
87
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:69:5
128
88
|
129
89
LL | unsf();
130
90
| ^^^^^^ call to unsafe function
131
91
|
132
92
= note: consult the function's documentation for information on how to avoid undefined behavior
133
93
134
94
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
135
-
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:102:9
95
+
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:73:9
136
96
|
137
97
LL | unsf();
138
98
| ^^^^^^ call to unsafe function
139
99
|
140
100
= note: consult the function's documentation for information on how to avoid undefined behavior
141
101
142
-
error: aborting due to 13 previous errors; 1 warning emitted
102
+
error: aborting due to 11 previous errors
143
103
144
104
For more information about this error, try `rustc --explain E0133`.
0 commit comments