Errors in promoteds may only cause lints not hard errors
This commit is contained in:
parent
6e1bbff2c6
commit
ecd5852194
19 changed files with 157 additions and 176 deletions
|
|
@ -1,8 +1,10 @@
|
|||
// build-fail
|
||||
// build-pass
|
||||
|
||||
#![warn(const_err)]
|
||||
|
||||
fn main() {
|
||||
&{[1, 2, 3][4]};
|
||||
//~^ ERROR index out of bounds
|
||||
//~| ERROR reaching this expression at runtime will panic or abort
|
||||
//~| ERROR erroneous constant used [E0080]
|
||||
&{ [1, 2, 3][4] };
|
||||
//~^ WARN index out of bounds
|
||||
//~| WARN reaching this expression at runtime will panic or abort
|
||||
//~| WARN erroneous constant used [const_err]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,26 @@
|
|||
error: index out of bounds: the len is 3 but the index is 4
|
||||
--> $DIR/array-literal-index-oob.rs:4:7
|
||||
warning: index out of bounds: the len is 3 but the index is 4
|
||||
--> $DIR/array-literal-index-oob.rs:6:8
|
||||
|
|
||||
LL | &{[1, 2, 3][4]};
|
||||
| ^^^^^^^^^^^^
|
||||
LL | &{ [1, 2, 3][4] };
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
error: reaching this expression at runtime will panic or abort
|
||||
--> $DIR/array-literal-index-oob.rs:4:7
|
||||
note: lint level defined here
|
||||
--> $DIR/array-literal-index-oob.rs:3:9
|
||||
|
|
||||
LL | &{[1, 2, 3][4]};
|
||||
| --^^^^^^^^^^^^-
|
||||
| |
|
||||
| indexing out of bounds: the len is 3 but the index is 4
|
||||
LL | #![warn(const_err)]
|
||||
| ^^^^^^^^^
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
--> $DIR/array-literal-index-oob.rs:4:5
|
||||
warning: reaching this expression at runtime will panic or abort
|
||||
--> $DIR/array-literal-index-oob.rs:6:8
|
||||
|
|
||||
LL | &{[1, 2, 3][4]};
|
||||
| ^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
LL | &{ [1, 2, 3][4] };
|
||||
| ---^^^^^^^^^^^^--
|
||||
| |
|
||||
| indexing out of bounds: the len is 3 but the index is 4
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
warning: erroneous constant used
|
||||
--> $DIR/array-literal-index-oob.rs:6:5
|
||||
|
|
||||
LL | &{ [1, 2, 3][4] };
|
||||
| ^^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
|
|||
fn main() {
|
||||
println!("{}", FOO);
|
||||
//~^ ERROR
|
||||
//~| ERROR erroneous constant used [E0080]
|
||||
//~| WARN erroneous constant used [const_err]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ error[E0080]: evaluation of constant expression failed
|
|||
LL | println!("{}", FOO);
|
||||
| ^^^ referenced constant has errors
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
warning: erroneous constant used
|
||||
--> $DIR/conditional_array_execution.rs:11:20
|
||||
|
|
||||
LL | println!("{}", FOO);
|
||||
| ^^^ referenced constant has errors
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
#![feature(const_fn)]
|
||||
#![allow(const_err)]
|
||||
|
||||
fn double(x: usize) -> usize { x * 2 }
|
||||
fn double(x: usize) -> usize {
|
||||
x * 2
|
||||
}
|
||||
const X: fn(usize) -> usize = double;
|
||||
|
||||
const fn bar(x: fn(usize) -> usize, y: usize) -> usize {
|
||||
|
|
@ -17,8 +19,6 @@ const Z: usize = bar(double, 2); // FIXME: should fail to typeck someday
|
|||
fn main() {
|
||||
assert_eq!(Y, 4);
|
||||
//~^ ERROR evaluation of constant expression failed
|
||||
//~| ERROR erroneous constant used [E0080]
|
||||
assert_eq!(Z, 4);
|
||||
//~^ ERROR evaluation of constant expression failed
|
||||
//~| ERROR erroneous constant used [E0080]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
warning: skipping const checks
|
||||
--> $DIR/const_fn_ptr_fail2.rs:11:5
|
||||
--> $DIR/const_fn_ptr_fail2.rs:13:5
|
||||
|
|
||||
LL | x(y)
|
||||
| ^^^^
|
||||
|
||||
error[E0080]: evaluation of constant expression failed
|
||||
--> $DIR/const_fn_ptr_fail2.rs:18:5
|
||||
--> $DIR/const_fn_ptr_fail2.rs:20:5
|
||||
|
|
||||
LL | assert_eq!(Y, 4);
|
||||
| ^^^^^^^^^^^-^^^^^
|
||||
|
|
@ -14,16 +14,8 @@ LL | assert_eq!(Y, 4);
|
|||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
--> $DIR/const_fn_ptr_fail2.rs:18:5
|
||||
|
|
||||
LL | assert_eq!(Y, 4);
|
||||
| ^^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error[E0080]: evaluation of constant expression failed
|
||||
--> $DIR/const_fn_ptr_fail2.rs:21:5
|
||||
--> $DIR/const_fn_ptr_fail2.rs:22:5
|
||||
|
|
||||
LL | assert_eq!(Z, 4);
|
||||
| ^^^^^^^^^^^-^^^^^
|
||||
|
|
@ -32,14 +24,6 @@ LL | assert_eq!(Z, 4);
|
|||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
--> $DIR/const_fn_ptr_fail2.rs:21:5
|
||||
|
|
||||
LL | assert_eq!(Z, 4);
|
||||
| ^^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@ const fn foo(x: u32) -> u32 {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
const X: u32 = 0-1;
|
||||
const X: u32 = 0 - 1;
|
||||
//~^ WARN any use of this value will cause
|
||||
const Y: u32 = foo(0-1);
|
||||
const Y: u32 = foo(0 - 1);
|
||||
//~^ WARN any use of this value will cause
|
||||
println!("{} {}", X, Y);
|
||||
//~^ ERROR evaluation of constant expression failed
|
||||
//~| ERROR evaluation of constant expression failed
|
||||
//~| ERROR erroneous constant used [E0080]
|
||||
//~| ERROR erroneous constant used [E0080]
|
||||
//~| WARN erroneous constant used [const_err]
|
||||
//~| WARN erroneous constant used [const_err]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
warning: any use of this value will cause an error
|
||||
--> $DIR/issue-43197.rs:10:20
|
||||
|
|
||||
LL | const X: u32 = 0-1;
|
||||
| ---------------^^^-
|
||||
LL | const X: u32 = 0 - 1;
|
||||
| ---------------^^^^^-
|
||||
| |
|
||||
| attempt to subtract with overflow
|
||||
|
|
||||
|
|
@ -15,8 +15,8 @@ LL | #![warn(const_err)]
|
|||
warning: any use of this value will cause an error
|
||||
--> $DIR/issue-43197.rs:12:24
|
||||
|
|
||||
LL | const Y: u32 = foo(0-1);
|
||||
| -------------------^^^--
|
||||
LL | const Y: u32 = foo(0 - 1);
|
||||
| -------------------^^^^^--
|
||||
| |
|
||||
| attempt to subtract with overflow
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ error[E0080]: evaluation of constant expression failed
|
|||
LL | println!("{} {}", X, Y);
|
||||
| ^ referenced constant has errors
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
warning: erroneous constant used
|
||||
--> $DIR/issue-43197.rs:14:23
|
||||
|
|
||||
LL | println!("{} {}", X, Y);
|
||||
|
|
@ -38,12 +38,12 @@ error[E0080]: evaluation of constant expression failed
|
|||
LL | println!("{} {}", X, Y);
|
||||
| ^ referenced constant has errors
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
warning: erroneous constant used
|
||||
--> $DIR/issue-43197.rs:14:26
|
||||
|
|
||||
LL | println!("{} {}", X, Y);
|
||||
| ^ referenced constant has errors
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
|
|||
|
|
@ -25,6 +25,5 @@ impl Foo for u16 {
|
|||
|
||||
fn main() {
|
||||
println!("{}", <Bar<u16, u8> as Foo>::AMT);
|
||||
//~^ ERROR erroneous constant used [E0080]
|
||||
//~| ERROR evaluation of constant expression failed [E0080]
|
||||
//~^ ERROR evaluation of constant expression failed [E0080]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,6 @@ error[E0080]: evaluation of constant expression failed
|
|||
LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
--> $DIR/issue-44578.rs:27:20
|
||||
|
|
||||
LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
// build-fail
|
||||
// build-pass
|
||||
// compile-flags: -O
|
||||
|
||||
#![deny(const_err)]
|
||||
#![warn(const_err)]
|
||||
|
||||
fn main() {
|
||||
println!("{}", 0u32 - 1);
|
||||
let _x = 0u32 - 1;
|
||||
//~^ ERROR const_err
|
||||
println!("{}", 1/(1-1));
|
||||
//~^ ERROR attempt to divide by zero [const_err]
|
||||
//~| ERROR const_err
|
||||
//~| ERROR erroneous constant used [E0080]
|
||||
let _x = 1/(1-1);
|
||||
//~^ ERROR const_err
|
||||
println!("{}", 1/(false as u32));
|
||||
//~^ ERROR attempt to divide by zero [const_err]
|
||||
//~| ERROR const_err
|
||||
//~| ERROR erroneous constant used [E0080]
|
||||
let _x = 1/(false as u32);
|
||||
//~^ ERROR const_err
|
||||
//~^ WARN const_err
|
||||
println!("{}", 1 / (1 - 1));
|
||||
//~^ WARN attempt to divide by zero [const_err]
|
||||
//~| WARN const_err
|
||||
//~| WARN erroneous constant used [const_err]
|
||||
let _x = 1 / (1 - 1);
|
||||
//~^ WARN const_err
|
||||
println!("{}", 1 / (false as u32));
|
||||
//~^ WARN attempt to divide by zero [const_err]
|
||||
//~| WARN const_err
|
||||
//~| WARN erroneous constant used [const_err]
|
||||
let _x = 1 / (false as u32);
|
||||
//~^ WARN const_err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: this expression will panic at runtime
|
||||
warning: this expression will panic at runtime
|
||||
--> $DIR/promoted_errors.rs:8:14
|
||||
|
|
||||
LL | let _x = 0u32 - 1;
|
||||
|
|
@ -7,57 +7,54 @@ LL | let _x = 0u32 - 1;
|
|||
note: lint level defined here
|
||||
--> $DIR/promoted_errors.rs:4:9
|
||||
|
|
||||
LL | #![deny(const_err)]
|
||||
LL | #![warn(const_err)]
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: attempt to divide by zero
|
||||
warning: attempt to divide by zero
|
||||
--> $DIR/promoted_errors.rs:10:20
|
||||
|
|
||||
LL | println!("{}", 1/(1-1));
|
||||
| ^^^^^^^
|
||||
LL | println!("{}", 1 / (1 - 1));
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: reaching this expression at runtime will panic or abort
|
||||
warning: reaching this expression at runtime will panic or abort
|
||||
--> $DIR/promoted_errors.rs:10:20
|
||||
|
|
||||
LL | println!("{}", 1/(1-1));
|
||||
| ^^^^^^^ dividing by zero
|
||||
LL | println!("{}", 1 / (1 - 1));
|
||||
| ^^^^^^^^^^^ dividing by zero
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
warning: erroneous constant used
|
||||
--> $DIR/promoted_errors.rs:10:20
|
||||
|
|
||||
LL | println!("{}", 1/(1-1));
|
||||
| ^^^^^^^ referenced constant has errors
|
||||
LL | println!("{}", 1 / (1 - 1));
|
||||
| ^^^^^^^^^^^ referenced constant has errors
|
||||
|
||||
error: attempt to divide by zero
|
||||
warning: attempt to divide by zero
|
||||
--> $DIR/promoted_errors.rs:14:14
|
||||
|
|
||||
LL | let _x = 1/(1-1);
|
||||
| ^^^^^^^
|
||||
LL | let _x = 1 / (1 - 1);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: attempt to divide by zero
|
||||
warning: attempt to divide by zero
|
||||
--> $DIR/promoted_errors.rs:16:20
|
||||
|
|
||||
LL | println!("{}", 1/(false as u32));
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
LL | println!("{}", 1 / (false as u32));
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: reaching this expression at runtime will panic or abort
|
||||
warning: reaching this expression at runtime will panic or abort
|
||||
--> $DIR/promoted_errors.rs:16:20
|
||||
|
|
||||
LL | println!("{}", 1/(false as u32));
|
||||
| ^^^^^^^^^^^^^^^^ dividing by zero
|
||||
LL | println!("{}", 1 / (false as u32));
|
||||
| ^^^^^^^^^^^^^^^^^^ dividing by zero
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
warning: erroneous constant used
|
||||
--> $DIR/promoted_errors.rs:16:20
|
||||
|
|
||||
LL | println!("{}", 1/(false as u32));
|
||||
| ^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
LL | println!("{}", 1 / (false as u32));
|
||||
| ^^^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
||||
error: attempt to divide by zero
|
||||
warning: attempt to divide by zero
|
||||
--> $DIR/promoted_errors.rs:20:14
|
||||
|
|
||||
LL | let _x = 1/(false as u32);
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
LL | let _x = 1 / (false as u32);
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
// build-fail
|
||||
// build-pass
|
||||
// compile-flags: -C overflow-checks=on -O
|
||||
|
||||
#![deny(const_err)]
|
||||
#![warn(const_err)]
|
||||
|
||||
fn main() {
|
||||
println!("{}", 0u32 - 1);
|
||||
//~^ ERROR attempt to subtract with overflow
|
||||
//~^ WARN attempt to subtract with overflow
|
||||
let _x = 0u32 - 1;
|
||||
//~^ ERROR attempt to subtract with overflow
|
||||
println!("{}", 1/(1-1));
|
||||
//~^ ERROR attempt to divide by zero [const_err]
|
||||
//~| ERROR const_err
|
||||
//~| ERROR erroneous constant used [E0080]
|
||||
let _x = 1/(1-1);
|
||||
//~^ ERROR const_err
|
||||
println!("{}", 1/(false as u32));
|
||||
//~^ ERROR attempt to divide by zero [const_err]
|
||||
//~| ERROR const_err
|
||||
//~| ERROR erroneous constant used [E0080]
|
||||
let _x = 1/(false as u32);
|
||||
//~^ ERROR const_err
|
||||
//~^ WARN attempt to subtract with overflow
|
||||
println!("{}", 1 / (1 - 1));
|
||||
//~^ WARN attempt to divide by zero [const_err]
|
||||
//~| WARN const_err
|
||||
//~| WARN erroneous constant used [const_err]
|
||||
let _x = 1 / (1 - 1);
|
||||
//~^ WARN const_err
|
||||
println!("{}", 1 / (false as u32));
|
||||
//~^ WARN attempt to divide by zero [const_err]
|
||||
//~| WARN const_err
|
||||
//~| WARN erroneous constant used [const_err]
|
||||
let _x = 1 / (false as u32);
|
||||
//~^ WARN const_err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: attempt to subtract with overflow
|
||||
warning: attempt to subtract with overflow
|
||||
--> $DIR/promoted_errors2.rs:7:20
|
||||
|
|
||||
LL | println!("{}", 0u32 - 1);
|
||||
|
|
@ -7,63 +7,60 @@ LL | println!("{}", 0u32 - 1);
|
|||
note: lint level defined here
|
||||
--> $DIR/promoted_errors2.rs:4:9
|
||||
|
|
||||
LL | #![deny(const_err)]
|
||||
LL | #![warn(const_err)]
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: attempt to subtract with overflow
|
||||
warning: attempt to subtract with overflow
|
||||
--> $DIR/promoted_errors2.rs:9:14
|
||||
|
|
||||
LL | let _x = 0u32 - 1;
|
||||
| ^^^^^^^^
|
||||
|
||||
error: attempt to divide by zero
|
||||
warning: attempt to divide by zero
|
||||
--> $DIR/promoted_errors2.rs:11:20
|
||||
|
|
||||
LL | println!("{}", 1/(1-1));
|
||||
| ^^^^^^^
|
||||
LL | println!("{}", 1 / (1 - 1));
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: reaching this expression at runtime will panic or abort
|
||||
warning: reaching this expression at runtime will panic or abort
|
||||
--> $DIR/promoted_errors2.rs:11:20
|
||||
|
|
||||
LL | println!("{}", 1/(1-1));
|
||||
| ^^^^^^^ dividing by zero
|
||||
LL | println!("{}", 1 / (1 - 1));
|
||||
| ^^^^^^^^^^^ dividing by zero
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
warning: erroneous constant used
|
||||
--> $DIR/promoted_errors2.rs:11:20
|
||||
|
|
||||
LL | println!("{}", 1/(1-1));
|
||||
| ^^^^^^^ referenced constant has errors
|
||||
LL | println!("{}", 1 / (1 - 1));
|
||||
| ^^^^^^^^^^^ referenced constant has errors
|
||||
|
||||
error: attempt to divide by zero
|
||||
warning: attempt to divide by zero
|
||||
--> $DIR/promoted_errors2.rs:15:14
|
||||
|
|
||||
LL | let _x = 1/(1-1);
|
||||
| ^^^^^^^
|
||||
LL | let _x = 1 / (1 - 1);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: attempt to divide by zero
|
||||
warning: attempt to divide by zero
|
||||
--> $DIR/promoted_errors2.rs:17:20
|
||||
|
|
||||
LL | println!("{}", 1/(false as u32));
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
LL | println!("{}", 1 / (false as u32));
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: reaching this expression at runtime will panic or abort
|
||||
warning: reaching this expression at runtime will panic or abort
|
||||
--> $DIR/promoted_errors2.rs:17:20
|
||||
|
|
||||
LL | println!("{}", 1/(false as u32));
|
||||
| ^^^^^^^^^^^^^^^^ dividing by zero
|
||||
LL | println!("{}", 1 / (false as u32));
|
||||
| ^^^^^^^^^^^^^^^^^^ dividing by zero
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
warning: erroneous constant used
|
||||
--> $DIR/promoted_errors2.rs:17:20
|
||||
|
|
||||
LL | println!("{}", 1/(false as u32));
|
||||
| ^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
LL | println!("{}", 1 / (false as u32));
|
||||
| ^^^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
||||
error: attempt to divide by zero
|
||||
warning: attempt to divide by zero
|
||||
--> $DIR/promoted_errors2.rs:21:14
|
||||
|
|
||||
LL | let _x = 1/(false as u32);
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
LL | let _x = 1 / (false as u32);
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@ const C: () = foo(); //~ WARN: skipping const checks
|
|||
fn main() {
|
||||
println!("{:?}", C);
|
||||
//~^ ERROR: evaluation of constant expression failed
|
||||
//~| ERROR: erroneous constant used [E0080]
|
||||
//~| WARN: erroneous constant used [const_err]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ error[E0080]: evaluation of constant expression failed
|
|||
LL | println!("{:?}", C);
|
||||
| ^ referenced constant has errors
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
warning: erroneous constant used
|
||||
--> $DIR/non_const_fn.rs:14:22
|
||||
|
|
||||
LL | println!("{:?}", C);
|
||||
| ^ referenced constant has errors
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue