mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 22:34:14 +00:00
rustc_mir: split qualify_consts' checking and value qualification.
This commit is contained in:
parent
732a2dc095
commit
f6d1e9790c
File diff suppressed because it is too large
Load Diff
@ -4,18 +4,18 @@ error[E0017]: references in constants may only refer to immutable values
|
||||
LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
|
||||
| ^^^^^^ constants require immutable values
|
||||
|
||||
error: cannot mutate statics in the initializer of another static
|
||||
--> $DIR/E0017.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^
|
||||
|
||||
error[E0017]: references in statics may only refer to immutable values
|
||||
--> $DIR/E0017.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^ statics require immutable values
|
||||
|
||||
error: cannot mutate statics in the initializer of another static
|
||||
--> $DIR/E0017.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^
|
||||
|
||||
error[E0596]: cannot borrow immutable static item `X` as mutable
|
||||
--> $DIR/E0017.rs:5:39
|
||||
|
|
||||
|
@ -4,18 +4,18 @@ error[E0017]: references in constants may only refer to immutable values
|
||||
LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
|
||||
| ^^^^^^ constants require immutable values
|
||||
|
||||
error: cannot mutate statics in the initializer of another static
|
||||
--> $DIR/E0017.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^
|
||||
|
||||
error[E0017]: references in statics may only refer to immutable values
|
||||
--> $DIR/E0017.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^ statics require immutable values
|
||||
|
||||
error: cannot mutate statics in the initializer of another static
|
||||
--> $DIR/E0017.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^
|
||||
|
||||
error[E0596]: cannot borrow immutable static item as mutable
|
||||
--> $DIR/E0017.rs:5:44
|
||||
|
|
||||
|
@ -4,18 +4,18 @@ error[E0017]: references in constants may only refer to immutable values
|
||||
LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
|
||||
| ^^^^^^ constants require immutable values
|
||||
|
||||
error: cannot mutate statics in the initializer of another static
|
||||
--> $DIR/E0388.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^
|
||||
|
||||
error[E0017]: references in statics may only refer to immutable values
|
||||
--> $DIR/E0388.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^ statics require immutable values
|
||||
|
||||
error: cannot mutate statics in the initializer of another static
|
||||
--> $DIR/E0388.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^
|
||||
|
||||
error[E0596]: cannot borrow immutable static item `X` as mutable
|
||||
--> $DIR/E0388.rs:5:39
|
||||
|
|
||||
|
@ -4,18 +4,18 @@ error[E0017]: references in constants may only refer to immutable values
|
||||
LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
|
||||
| ^^^^^^ constants require immutable values
|
||||
|
||||
error: cannot mutate statics in the initializer of another static
|
||||
--> $DIR/E0388.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^
|
||||
|
||||
error[E0017]: references in statics may only refer to immutable values
|
||||
--> $DIR/E0388.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^ statics require immutable values
|
||||
|
||||
error: cannot mutate statics in the initializer of another static
|
||||
--> $DIR/E0388.rs:5:39
|
||||
|
|
||||
LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
|
||||
| ^^^^^^
|
||||
|
||||
error[E0596]: cannot borrow immutable static item as mutable
|
||||
--> $DIR/E0388.rs:5:44
|
||||
|
|
||||
|
@ -4,18 +4,18 @@ error[E0017]: references in constants may only refer to immutable values
|
||||
LL | const C1: &'static mut [usize] = &mut [];
|
||||
| ^^^^^^^ constants require immutable values
|
||||
|
||||
error[E0013]: constants cannot refer to statics, use a constant instead
|
||||
--> $DIR/issue-17718-const-bad-values.rs:5:41
|
||||
|
|
||||
LL | const C2: &'static mut usize = unsafe { &mut S };
|
||||
| ^^^^^^
|
||||
|
||||
error[E0017]: references in constants may only refer to immutable values
|
||||
--> $DIR/issue-17718-const-bad-values.rs:5:41
|
||||
|
|
||||
LL | const C2: &'static mut usize = unsafe { &mut S };
|
||||
| ^^^^^^ constants require immutable values
|
||||
|
||||
error[E0013]: constants cannot refer to statics, use a constant instead
|
||||
--> $DIR/issue-17718-const-bad-values.rs:5:41
|
||||
|
|
||||
LL | const C2: &'static mut usize = unsafe { &mut S };
|
||||
| ^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors occurred: E0013, E0017.
|
||||
|
Loading…
Reference in New Issue
Block a user