2021-01-24 05:50:30 -06:00
|
|
|
error[E0080]: evaluation of constant value failed
|
2022-09-21 06:05:20 -05:00
|
|
|
--> $DIR/const_fn_ptr_fail2.rs:9:5
|
2022-06-04 10:06:04 -05:00
|
|
|
|
|
2022-11-29 07:10:42 -06:00
|
|
|
LL | x(y)
|
|
|
|
| ^^^^ calling non-const function `double`
|
|
|
|
|
|
|
|
|
note: inside `bar`
|
|
|
|
--> $DIR/const_fn_ptr_fail2.rs:9:5
|
|
|
|
|
|
2022-06-04 10:06:04 -05:00
|
|
|
LL | x(y)
|
|
|
|
| ^^^^
|
2022-11-29 07:10:42 -06:00
|
|
|
note: inside `Y`
|
|
|
|
--> $DIR/const_fn_ptr_fail2.rs:14:18
|
|
|
|
|
|
2022-06-04 10:06:04 -05:00
|
|
|
LL | const Y: usize = bar(X, 2); // FIXME: should fail to typeck someday
|
2022-11-29 07:10:42 -06:00
|
|
|
| ^^^^^^^^^
|
2022-06-04 10:06:04 -05:00
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
error[E0080]: evaluation of constant value failed
|
|
|
|
--> $DIR/const_fn_ptr_fail2.rs:9:5
|
2022-06-04 10:06:04 -05:00
|
|
|
|
|
2022-11-29 07:10:42 -06:00
|
|
|
LL | x(y)
|
|
|
|
| ^^^^ calling non-const function `double`
|
|
|
|
|
|
|
|
|
note: inside `bar`
|
|
|
|
--> $DIR/const_fn_ptr_fail2.rs:9:5
|
|
|
|
|
|
2022-06-04 10:06:04 -05:00
|
|
|
LL | x(y)
|
|
|
|
| ^^^^
|
2022-11-29 07:10:42 -06:00
|
|
|
note: inside `Z`
|
|
|
|
--> $DIR/const_fn_ptr_fail2.rs:15:18
|
|
|
|
|
|
2022-06-04 10:06:04 -05:00
|
|
|
LL | const Z: usize = bar(double, 2); // FIXME: should fail to typeck someday
|
2022-11-29 07:10:42 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
2022-06-04 10:06:04 -05:00
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
warning: skipping const checks
|
2022-06-04 10:06:04 -05:00
|
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
help: skipping check that does not even have a feature gate
|
|
|
|
--> $DIR/const_fn_ptr_fail2.rs:9:5
|
2022-06-04 10:06:04 -05:00
|
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
LL | x(y)
|
|
|
|
| ^^^^
|
2022-06-04 10:06:04 -05:00
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
error: aborting due to 2 previous errors; 1 warning emitted
|
2022-06-04 10:06:04 -05:00
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
For more information about this error, try `rustc --explain E0080`.
|