2020-12-27 11:33:56 -06:00
error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability
2021-06-27 07:59:38 -05:00
--> $DIR/ranged_ints3_const.rs:15:13
2018-11-06 10:43:32 -06:00
|
2019-03-09 06:03:44 -06:00
LL | let y = &x.0;
2018-11-06 10:43:32 -06:00
| ^^^^
2020-12-27 11:33:56 -06:00
|
= note: see issue #80384 <https://github.com/rust-lang/rust/issues/80384> for more information
= help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable
2018-11-06 10:43:32 -06:00
2020-12-27 11:33:56 -06:00
error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability
2021-06-27 07:59:38 -05:00
--> $DIR/ranged_ints3_const.rs:22:22
2018-11-06 10:43:32 -06:00
|
2019-03-09 06:03:44 -06:00
LL | let y = unsafe { &x.0 };
2018-11-06 10:43:32 -06:00
| ^^^^
2020-12-27 11:33:56 -06:00
|
= note: see issue #80384 <https://github.com/rust-lang/rust/issues/80384> for more information
= help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable
2018-11-06 10:43:32 -06:00
error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block
2021-06-27 07:59:38 -05:00
--> $DIR/ranged_ints3_const.rs:15:13
2018-11-06 10:43:32 -06:00
|
2019-03-09 06:03:44 -06:00
LL | let y = &x.0;
2018-11-06 10:43:32 -06:00
| ^^^^ borrow of layout constrained field with interior mutability
|
= note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
error: aborting due to 3 previous errors
2020-12-27 11:33:56 -06:00
Some errors have detailed explanations: E0133, E0658.
2018-11-06 10:43:32 -06:00
For more information about an error, try `rustc --explain E0133`.