Rebase fallout
This commit is contained in:
parent
d2e682afed
commit
1c5ff292fc
31 changed files with 69 additions and 319 deletions
|
|
@ -4,24 +4,12 @@ error[E0015]: calls in constants are limited to constant functions, tuple struct
|
|||
LL | let array: [usize; Dim3::dim()]
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error[E0080]: evaluation of constant value failed
|
||||
--> $DIR/issue-39559-2.rs:24:24
|
||||
|
|
||||
LL | let array: [usize; Dim3::dim()]
|
||||
| ^^^^^^^^^^^ calling non-const fn `<Dim3 as Dim>::dim`
|
||||
|
||||
error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
|
||||
--> $DIR/issue-39559-2.rs:26:15
|
||||
|
|
||||
LL | = [0; Dim3::dim()];
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error[E0080]: evaluation of constant value failed
|
||||
--> $DIR/issue-39559-2.rs:27:15
|
||||
|
|
||||
LL | = [0; Dim3::dim()];
|
||||
| ^^^^^^^^^^^ calling non-const fn `<Dim3 as Dim>::dim`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0015`.
|
||||
|
|
|
|||
|
|
@ -12,11 +12,10 @@ fn xyz() -> u8 { 42 }
|
|||
|
||||
const NUM: u8 = xyz();
|
||||
//~^ ERROR calls in constants are limited to constant functions, tuple structs and tuple variants
|
||||
//~| ERROR any use of this value will cause an error
|
||||
|
||||
fn main() {
|
||||
match 1 {
|
||||
NUM => unimplemented!(), //~ ERROR could not evaluate constant pattern
|
||||
NUM => unimplemented!(),
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,22 +4,6 @@ error[E0015]: calls in constants are limited to constant functions, tuple struct
|
|||
LL | const NUM: u8 = xyz();
|
||||
| ^^^^^
|
||||
|
||||
error: any use of this value will cause an error
|
||||
--> $DIR/issue-43105.rs:13:1
|
||||
|
|
||||
LL | const NUM: u8 = xyz();
|
||||
| ^^^^^^^^^^^^^^^^-----^
|
||||
| |
|
||||
| calling non-const fn `xyz`
|
||||
|
|
||||
= note: #[deny(const_err)] on by default
|
||||
|
||||
error: could not evaluate constant pattern
|
||||
--> $DIR/issue-43105.rs:19:9
|
||||
|
|
||||
LL | NUM => unimplemented!(), //~ ERROR could not evaluate constant pattern
|
||||
| ^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0015`.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ error[E0080]: it is undefined behavior to use this value
|
|||
--> $DIR/issue-52023-array-size-pointer-cast.rs:12:17
|
||||
|
|
||||
LL | let _ = [0; (&0 as *const i32) as usize]; //~ ERROR casting pointers to integers in constants
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected the type usize
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected initialized plain bits
|
||||
|
|
||||
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue