Update tests for const-eval error handling changes.
This commit is contained in:
parent
46de12ad00
commit
8491c82c90
@ -23,6 +23,7 @@ pub trait Public: Private<
|
||||
<Self as Public>::P,
|
||||
//~^ ERROR illegal recursive type; insert an enum or struct in the cycle, if this is desired
|
||||
<Self as Public>::R
|
||||
//~^ ERROR unsupported cyclic reference between types/traits detected
|
||||
> {
|
||||
type P;
|
||||
type R;
|
||||
|
@ -12,5 +12,7 @@ const TUP: (usize,) = (42,);
|
||||
|
||||
fn main() {
|
||||
let a: [isize; TUP.1];
|
||||
//~^ ERROR expected constant expr for array length: tuple index out of bounds
|
||||
//~^ ERROR array length constant evaluation error: tuple index out of bounds
|
||||
//~| ERROR attempted out-of-bounds tuple index
|
||||
//~| ERROR attempted out-of-bounds tuple index
|
||||
}
|
||||
|
@ -13,5 +13,7 @@ const STRUCT: MyStruct = MyStruct { field: 42 };
|
||||
|
||||
fn main() {
|
||||
let a: [isize; STRUCT.nonexistent_field];
|
||||
//~^ ERROR expected constant expr for array length: nonexistent struct field
|
||||
//~^ ERROR array length constant evaluation error: nonexistent struct field
|
||||
//~| ERROR attempted access of field `nonexistent_field`
|
||||
//~| ERROR attempted access of field `nonexistent_field`
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
fn main() {
|
||||
fn bar(n: isize) {
|
||||
let _x: [isize; n];
|
||||
//~^ ERROR expected constant expr for array length: non-constant path in constant expr
|
||||
//~^ ERROR no type for local variable
|
||||
//~| ERROR array length constant evaluation error: non-constant path in constant expr
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user