aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/tests/ui/unsafe_op_in_unsafe_task.stderr
blob: 0333955842a75ac0af0849d74265c150923b47fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
error[E0133]: call to unsafe function `std::ptr::const_ptr::<impl *const T>::read` is unsafe and requires unsafe block
 --> tests/ui/unsafe_op_in_unsafe_task.rs:7:5
  |
7 |     (&x as *const i32).read();
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
  |
  = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
  = note: consult the function's documentation for information on how to avoid undefined behavior
note: an unsafe function restricts its caller, but its body is safe by default
 --> tests/ui/unsafe_op_in_unsafe_task.rs:5:1
  |
5 | async unsafe fn task() {
  | ^^^^^^^^^^^^^^^^^^^^^^
note: the lint level is defined here
 --> tests/ui/unsafe_op_in_unsafe_task.rs:2:9
  |
2 | #![deny(unsafe_op_in_unsafe_fn)]
  |         ^^^^^^^^^^^^^^^^^^^^^^