Report errors in statics during collecting instead of translating
This commit is contained in:
parent
df6b40e342
commit
5b247b9bbe
6 changed files with 116 additions and 69 deletions
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
static FOO: i32 = [][0]; //~ ERROR E0080
|
||||
static FOO: i32 = [][0];
|
||||
//~^ ERROR E0080
|
||||
//~| ERROR E0080
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -20,15 +20,23 @@ error[E0016]: blocks in constant functions are limited to items and tail express
|
|||
| ^
|
||||
|
||||
error[E0015]: calls in constant functions are limited to constant functions, struct and enum constructors
|
||||
--> $DIR/const-fn-error.rs:17:14
|
||||
--> $DIR/const-fn-error.rs:18:14
|
||||
|
|
||||
<<<<<<< HEAD
|
||||
LL | for i in 0..x { //~ ERROR calls in constant functions
|
||||
=======
|
||||
18 | for i in 0..x {
|
||||
>>>>>>> Report errors in statics during collecting instead of translating
|
||||
| ^^^^
|
||||
|
||||
error[E0019]: constant function contains unimplemented expression type
|
||||
--> $DIR/const-fn-error.rs:17:14
|
||||
--> $DIR/const-fn-error.rs:18:14
|
||||
|
|
||||
<<<<<<< HEAD
|
||||
LL | for i in 0..x { //~ ERROR calls in constant functions
|
||||
=======
|
||||
18 | for i in 0..x {
|
||||
>>>>>>> Report errors in statics during collecting instead of translating
|
||||
| ^^^^
|
||||
|
||||
error[E0080]: constant evaluation error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue