fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB45 linesraw
1error[E0080]: evaluation of constant value failed
2  --> $DIR/const_fn_ptr_fail2.rs:9:5
3   |
4LL |     x(y)
5   |     ^^^^ calling non-const function `double`
6   |
7note: inside `bar`
8  --> $DIR/const_fn_ptr_fail2.rs:9:5
9   |
10LL |     x(y)
11   |     ^^^^
12note: inside `Y`
13  --> $DIR/const_fn_ptr_fail2.rs:14:18
14   |
15LL | const Y: usize = bar(X, 2); // FIXME: should fail to typeck someday
16   |                  ^^^^^^^^^
17
18error[E0080]: evaluation of constant value failed
19  --> $DIR/const_fn_ptr_fail2.rs:9:5
20   |
21LL |     x(y)
22   |     ^^^^ calling non-const function `double`
23   |
24note: inside `bar`
25  --> $DIR/const_fn_ptr_fail2.rs:9:5
26   |
27LL |     x(y)
28   |     ^^^^
29note: inside `Z`
30  --> $DIR/const_fn_ptr_fail2.rs:15:18
31   |
32LL | const Z: usize = bar(double, 2); // FIXME: should fail to typeck someday
33   |                  ^^^^^^^^^^^^^^
34
35warning: skipping const checks
36   |
37help: skipping check that does not even have a feature gate
38  --> $DIR/const_fn_ptr_fail2.rs:9:5
39   |
40LL |     x(y)
41   |     ^^^^
42
43error: aborting due to 2 previous errors; 1 warning emitted
44
45For more information about this error, try `rustc --explain E0080`.