rust/tests/ui/consts/const-call.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
356 B
Plaintext
Raw Normal View History

2021-12-09 17:10:05 +00:00
error[E0015]: cannot call non-const fn `f` in constants
2018-12-25 15:56:47 +00:00
--> $DIR/const-call.rs:6:17
2018-08-08 12:28:26 +00:00
|
LL | let _ = [0; f(2)];
| ^^^^
2021-12-09 17:10:05 +00:00
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
2018-08-08 12:28:26 +00:00
2020-11-06 15:57:05 +00:00
error: aborting due to previous error
2018-08-08 12:28:26 +00:00
2020-11-06 15:57:05 +00:00
For more information about this error, try `rustc --explain E0015`.