fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` 2 --> $DIR/issue-100313.rs:10:13 3 | 4LL | *(B as *const bool as *mut bool) = false; 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6 | 7 = note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html> 8 = note: `#[deny(invalid_reference_casting)]` on by default 9 10error[E0080]: evaluation of constant value failed 11 --> $DIR/issue-100313.rs:10:13 12 | 13LL | *(B as *const bool as *mut bool) = false; 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to alloc7 which is read-only 15 | 16note: inside `T::<&true>::set_false` 17 --> $DIR/issue-100313.rs:10:13 18 | 19LL | *(B as *const bool as *mut bool) = false; 20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 21note: inside `_` 22 --> $DIR/issue-100313.rs:19:5 23 | 24LL | x.set_false(); 25 | ^^^^^^^^^^^^^ 26 27error: aborting due to 2 previous errors 28 29For more information about this error, try `rustc --explain E0080`.