d56cdd48cb
Update tests
43 lines
1.8 KiB
Plaintext
43 lines
1.8 KiB
Plaintext
error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
|
|
--> $DIR/ranged_ints2_const.rs:11:13
|
|
|
|
|
LL | let y = &mut x.0;
|
|
| ^^^^^^^^ mutation of layout constrained field
|
|
|
|
|
= note: mutating layout constrained fields cannot statically be checked for valid values
|
|
|
|
error[E0658]: mutable references are not allowed in constant functions
|
|
--> $DIR/ranged_ints2_const.rs:11:13
|
|
|
|
|
LL | let y = &mut x.0;
|
|
| ^^^^^^^^
|
|
|
|
|
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
|
|
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error[E0658]: mutable references are not allowed in constant functions
|
|
--> $DIR/ranged_ints2_const.rs:18:22
|
|
|
|
|
LL | let y = unsafe { &mut x.0 };
|
|
| ^^^^^^^^
|
|
|
|
|
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
|
|
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error[E0658]: mutable references are not allowed in constant functions
|
|
--> $DIR/ranged_ints2_const.rs:24:22
|
|
|
|
|
LL | unsafe { let y = &mut x.0; }
|
|
| ^^^^^^^^
|
|
|
|
|
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
|
|
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
Some errors have detailed explanations: E0133, E0658.
|
|
For more information about an error, try `rustc --explain E0133`.
|