fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
931 B19 linesraw
1error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block
2  --> $DIR/ranged_ints3_match.rs:14:17
3   |
4LL |         NonZero(ref x) => { x }
5   |                 ^^^^^ borrow of layout constrained field with interior mutability
6   |
7   = note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
8
9error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
10  --> $DIR/ranged_ints3_match.rs:20:23
11   |
12LL |     match y { NonZero(ref mut y) => { y } };
13   |                       ^^^^^^^^^ mutation of layout constrained field
14   |
15   = note: mutating layout constrained fields cannot statically be checked for valid values
16
17error: aborting due to 2 previous errors
18
19For more information about this error, try `rustc --explain E0133`.