1
Fork 0

Report const eval error inside the query

This commit is contained in:
Oliver Schneider 2018-08-26 15:19:34 +02:00 committed by Oliver Scherer
parent 3476ac0bee
commit 7fdf06cdde
135 changed files with 1472 additions and 1090 deletions

View file

@ -1,8 +1,8 @@
error: this constant cannot be used
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:24:1
|
LL | / const VALS_I8: (i8,) =
LL | | //~^ ERROR this constant cannot be used
LL | / const VALS_I8: (i8,) = //~ ERROR any use of this value will cause an error
LL | | //~^ const_err
LL | | (
LL | | i8::MAX + 1,
| | ----------- attempt to add with overflow
@ -15,80 +15,133 @@ note: lint level defined here
LL | #![deny(const_err)]
| ^^^^^^^^^
error: this constant cannot be used
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:30:1
|
LL | / const VALS_I16: (i16,) =
LL | | //~^ ERROR this constant cannot be used
LL | / const VALS_I16: (i16,) = //~ ERROR any use of this value will cause an error
LL | | (
LL | | i16::MAX + 1,
| | ------------ attempt to add with overflow
LL | | );
| |_______^
error: this constant cannot be used
--> $DIR/const-eval-overflow2b.rs:36:1
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:35:1
|
LL | / const VALS_I32: (i32,) =
LL | | //~^ ERROR this constant cannot be used
LL | / const VALS_I32: (i32,) = //~ ERROR any use of this value will cause an error
LL | | (
LL | | i32::MAX + 1,
| | ------------ attempt to add with overflow
LL | | );
| |_______^
error: this constant cannot be used
--> $DIR/const-eval-overflow2b.rs:42:1
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:40:1
|
LL | / const VALS_I64: (i64,) =
LL | | //~^ ERROR this constant cannot be used
LL | / const VALS_I64: (i64,) = //~ ERROR any use of this value will cause an error
LL | | (
LL | | i64::MAX + 1,
| | ------------ attempt to add with overflow
LL | | );
| |_______^
error: this constant cannot be used
--> $DIR/const-eval-overflow2b.rs:48:1
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:45:1
|
LL | / const VALS_U8: (u8,) =
LL | | //~^ ERROR this constant cannot be used
LL | / const VALS_U8: (u8,) = //~ ERROR any use of this value will cause an error
LL | | (
LL | | u8::MAX + 1,
| | ----------- attempt to add with overflow
LL | | );
| |_______^
error: this constant cannot be used
--> $DIR/const-eval-overflow2b.rs:54:1
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:50:1
|
LL | / const VALS_U16: (u16,) = (
LL | | //~^ ERROR this constant cannot be used
LL | / const VALS_U16: (u16,) = ( //~ ERROR any use of this value will cause an error
LL | | u16::MAX + 1,
| | ------------ attempt to add with overflow
LL | | );
| |_______^
error: this constant cannot be used
--> $DIR/const-eval-overflow2b.rs:59:1
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:54:1
|
LL | / const VALS_U32: (u32,) = (
LL | | //~^ ERROR this constant cannot be used
LL | / const VALS_U32: (u32,) = ( //~ ERROR any use of this value will cause an error
LL | | u32::MAX + 1,
| | ------------ attempt to add with overflow
LL | | );
| |_______^
error: this constant cannot be used
--> $DIR/const-eval-overflow2b.rs:64:1
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:58:1
|
LL | / const VALS_U64: (u64,) =
LL | | //~^ ERROR this constant cannot be used
LL | / const VALS_U64: (u64,) = //~ ERROR any use of this value will cause an error
LL | | (
LL | | u64::MAX + 1,
| | ------------ attempt to add with overflow
LL | | );
| |_______^
error: aborting due to 8 previous errors
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:24:1
|
LL | / const VALS_I8: (i8,) = //~ ERROR any use of this value will cause an error
LL | | //~^ const_err
LL | | (
LL | | i8::MAX + 1,
| | ----------- attempt to add with overflow
LL | | );
| |_______^
error[E0080]: erroneous constant used
--> $DIR/const-eval-overflow2b.rs:64:5
|
LL | foo(VALS_I8); //~ ERROR erroneous constant used
| ^^^^^^^^^^^^ referenced constant has errors
error[E0080]: erroneous constant used
--> $DIR/const-eval-overflow2b.rs:65:5
|
LL | foo(VALS_I16); //~ ERROR erroneous constant used
| ^^^^^^^^^^^^^ referenced constant has errors
error[E0080]: erroneous constant used
--> $DIR/const-eval-overflow2b.rs:66:5
|
LL | foo(VALS_I32); //~ ERROR erroneous constant used
| ^^^^^^^^^^^^^ referenced constant has errors
error[E0080]: erroneous constant used
--> $DIR/const-eval-overflow2b.rs:67:5
|
LL | foo(VALS_I64); //~ ERROR erroneous constant used
| ^^^^^^^^^^^^^ referenced constant has errors
error[E0080]: erroneous constant used
--> $DIR/const-eval-overflow2b.rs:69:5
|
LL | foo(VALS_U8); //~ ERROR erroneous constant used
| ^^^^^^^^^^^^ referenced constant has errors
error[E0080]: erroneous constant used
--> $DIR/const-eval-overflow2b.rs:70:5
|
LL | foo(VALS_U16); //~ ERROR erroneous constant used
| ^^^^^^^^^^^^^ referenced constant has errors
error[E0080]: erroneous constant used
--> $DIR/const-eval-overflow2b.rs:71:5
|
LL | foo(VALS_U32); //~ ERROR erroneous constant used
| ^^^^^^^^^^^^^ referenced constant has errors
error[E0080]: erroneous constant used
--> $DIR/const-eval-overflow2b.rs:72:5
|
LL | foo(VALS_U64); //~ ERROR erroneous constant used
| ^^^^^^^^^^^^^ referenced constant has errors
error: aborting due to 17 previous errors
For more information about this error, try `rustc --explain E0080`.