2023-06-08 14:36:20 -05:00
|
|
|
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
|
2023-07-14 14:54:27 -05:00
|
|
|
--> $DIR/issue-100313.rs:10:13
|
|
|
|
|
|
|
|
|
LL | *(B as *const bool as *mut bool) = false;
|
2023-06-08 14:36:20 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-07-14 14:54:27 -05:00
|
|
|
|
|
2023-08-22 10:17:44 -05:00
|
|
|
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
|
2023-07-14 14:54:27 -05:00
|
|
|
= note: `#[deny(invalid_reference_casting)]` on by default
|
|
|
|
|
2022-08-10 02:58:53 -05:00
|
|
|
error[E0080]: evaluation of constant value failed
|
|
|
|
--> $DIR/issue-100313.rs:10:13
|
|
|
|
|
|
2022-11-29 07:10:42 -06:00
|
|
|
LL | *(B as *const bool as *mut bool) = false;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to alloc7 which is read-only
|
|
|
|
|
|
|
|
|
note: inside `T::<&true>::set_false`
|
|
|
|
--> $DIR/issue-100313.rs:10:13
|
|
|
|
|
|
2022-08-10 02:58:53 -05:00
|
|
|
LL | *(B as *const bool as *mut bool) = false;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-11-29 07:10:42 -06:00
|
|
|
note: inside `_`
|
2023-07-14 14:54:27 -05:00
|
|
|
--> $DIR/issue-100313.rs:19:5
|
2022-11-29 07:10:42 -06:00
|
|
|
|
|
2022-08-10 02:58:53 -05:00
|
|
|
LL | x.set_false();
|
2022-11-29 07:10:42 -06:00
|
|
|
| ^^^^^^^^^^^^^
|
2022-08-10 02:58:53 -05:00
|
|
|
|
2023-07-14 14:54:27 -05:00
|
|
|
error: aborting due to 2 previous errors
|
2022-08-10 02:58:53 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0080`.
|