2022-07-27 22:03:16 +00:00
|
|
|
error: call to unsafe function is unsafe and requires unsafe block (error E0133)
|
|
|
|
--> $DIR/wrapping-unsafe-block-sugg.rs:8:5
|
|
|
|
|
|
|
|
|
LL | unsf();
|
|
|
|
| ^^^^^^ call to unsafe function
|
|
|
|
|
|
|
|
|
= note: consult the function's documentation for information on how to avoid undefined behavior
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/wrapping-unsafe-block-sugg.rs:3:9
|
|
|
|
|
|
|
|
|
LL | #![deny(unsafe_op_in_unsafe_fn)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: call to unsafe function is unsafe and requires unsafe block (error E0133)
|
|
|
|
--> $DIR/wrapping-unsafe-block-sugg.rs:9:5
|
|
|
|
|
|
|
|
|
LL | unsf();
|
|
|
|
| ^^^^^^ call to unsafe function
|
|
|
|
|
|
|
|
|
= note: consult the function's documentation for information on how to avoid undefined behavior
|
|
|
|
|
2023-05-27 12:37:18 +00:00
|
|
|
error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
|
|
|
|
--> $DIR/wrapping-unsafe-block-sugg.rs:13:13
|
|
|
|
|
|
|
|
|
LL | let y = *x;
|
|
|
|
| ^^ dereference of raw pointer
|
|
|
|
|
|
|
|
|
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
|
|
|
|
|
|
|
error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
|
|
|
|
--> $DIR/wrapping-unsafe-block-sugg.rs:14:9
|
|
|
|
|
|
|
|
|
LL | y + *x
|
|
|
|
| ^^ dereference of raw pointer
|
|
|
|
|
|
|
|
|
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
|
|
|
|
|
|
|
error: use of mutable static is unsafe and requires unsafe block (error E0133)
|
|
|
|
--> $DIR/wrapping-unsafe-block-sugg.rs:19:13
|
|
|
|
|
|
|
|
|
LL | let y = BAZ;
|
|
|
|
| ^^^ use of mutable static
|
|
|
|
|
|
|
|
|
= note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
|
|
|
|
|
|
|
|
error: use of mutable static is unsafe and requires unsafe block (error E0133)
|
|
|
|
--> $DIR/wrapping-unsafe-block-sugg.rs:20:9
|
|
|
|
|
|
|
|
|
LL | y + BAZ
|
|
|
|
| ^^^ use of mutable static
|
|
|
|
|
|
|
|
|
= note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
2022-07-27 22:03:16 +00:00
|
|
|
|