Bless remaining test output

This commit is contained in:
Matthew Jasper 2019-11-19 23:16:58 +00:00
parent 9abc34ed9d
commit 025630d189
7 changed files with 30 additions and 47 deletions

View File

@ -10,10 +10,12 @@ fn main() {
// START rustc.main.ConstProp.before.mir
// bb0: {
// ...
// _2 = (FOO: u8);
// _3 = const Scalar(AllocId(0).0x0) : &u8;
// _2 = (*_3);
// ...
// _3 = (FOO: u8);
// _1 = Add(move _2, move _3);
// _5 = const Scalar(AllocId(0).0x0) : &u8;
// _4 = (*_5);
// _1 = Add(move _2, move _4);
// ...
// }
// END rustc.main.ConstProp.before.mir
@ -22,8 +24,8 @@ fn main() {
// ...
// _2 = const 2u8;
// ...
// _3 = const 2u8;
// _1 = Add(move _2, move _3);
// _4 = const 2u8;
// _1 = Add(move _2, move _4);
// ...
// }
// END rustc.main.ConstProp.after.mir

View File

@ -4,12 +4,6 @@ error[E0017]: references in constants may only refer to immutable values
LL | let b: *mut u32 = &mut a;
| ^^^^^^ constants require immutable values
error[E0019]: constant contains unimplemented expression type
--> $DIR/projection_qualif.rs:7:18
|
LL | unsafe { *b = 5; }
| ^^^^^^
error[E0658]: dereferencing raw pointers in constants is unstable
--> $DIR/projection_qualif.rs:7:18
|
@ -19,6 +13,12 @@ LL | unsafe { *b = 5; }
= note: for more information, see https://github.com/rust-lang/rust/issues/51911
= help: add `#![feature(const_raw_ptr_deref)]` to the crate attributes to enable
error[E0019]: constant contains unimplemented expression type
--> $DIR/projection_qualif.rs:7:18
|
LL | unsafe { *b = 5; }
| ^^^^^^
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0017, E0019, E0658.

View File

@ -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:46
|
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 have detailed explanations: E0013, E0017.

View File

@ -1,8 +1,8 @@
error[E0013]: constants cannot refer to statics, use a constant instead
--> $DIR/issue-17718-references.rs:9:28
--> $DIR/issue-17718-references.rs:9:29
|
LL | const T2: &'static usize = &S;
| ^^
| ^
error[E0013]: constants cannot refer to statics, use a constant instead
--> $DIR/issue-17718-references.rs:14:19

View File

@ -1,8 +1,8 @@
error[E0013]: constants cannot refer to statics, use a constant instead
--> $DIR/issue-18118-2.rs:4:9
--> $DIR/issue-18118-2.rs:4:10
|
LL | &p
| ^^
| ^
error: aborting due to previous error

View File

@ -8,14 +8,12 @@ static B: u32 = A;
static C: &u32 = &A;
//~^ ERROR thread-local statics cannot be accessed at compile-time
//~| ERROR thread-local variable borrowed past end of function
const D: u32 = A;
//~^ ERROR thread-local statics cannot be accessed at compile-time
const E: &u32 = &A;
//~^ ERROR thread-local statics cannot be accessed at compile-time
//~| ERROR thread-local variable borrowed past end of function
const fn f() -> u32 {
A

View File

@ -5,45 +5,28 @@ LL | static B: u32 = A;
| ^
error[E0625]: thread-local statics cannot be accessed at compile-time
--> $DIR/thread-local-in-ctfe.rs:9:18
--> $DIR/thread-local-in-ctfe.rs:9:19
|
LL | static C: &u32 = &A;
| ^^
error[E0712]: thread-local variable borrowed past end of function
--> $DIR/thread-local-in-ctfe.rs:9:18
|
LL | static C: &u32 = &A;
| ^^- end of enclosing function is here
| |
| thread-local variables cannot be borrowed beyond the end of the function
| ^
error[E0625]: thread-local statics cannot be accessed at compile-time
--> $DIR/thread-local-in-ctfe.rs:13:16
--> $DIR/thread-local-in-ctfe.rs:12:16
|
LL | const D: u32 = A;
| ^
error[E0625]: thread-local statics cannot be accessed at compile-time
--> $DIR/thread-local-in-ctfe.rs:16:17
--> $DIR/thread-local-in-ctfe.rs:15:18
|
LL | const E: &u32 = &A;
| ^^
error[E0712]: thread-local variable borrowed past end of function
--> $DIR/thread-local-in-ctfe.rs:16:17
|
LL | const E: &u32 = &A;
| ^^- end of enclosing function is here
| |
| thread-local variables cannot be borrowed beyond the end of the function
| ^
error[E0625]: thread-local statics cannot be accessed at compile-time
--> $DIR/thread-local-in-ctfe.rs:21:5
--> $DIR/thread-local-in-ctfe.rs:19:5
|
LL | A
| ^
error: aborting due to 7 previous errors
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0712`.