os-rust/tests/ui/const-generics/infer/cannot-infer-const-args.stderr

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

20 lines
583 B
Text
Raw Normal View History

2024-06-17 08:34:26 +00:00
error[E0284]: type annotations needed
--> $DIR/cannot-infer-const-args.rs:6:5
|
LL | foo();
2022-02-14 13:25:26 +01:00
| ^^^ cannot infer the value of the const parameter `X` declared on the function `foo`
|
2024-06-17 08:34:26 +00:00
note: required by a bound in `foo`
--> $DIR/cannot-infer-const-args.rs:1:8
|
LL | fn foo<const X: usize>() -> usize {
| ^^^^^^^^^^^^^^ required by this bound in `foo`
2022-02-14 13:25:26 +01:00
help: consider specifying the generic argument
|
LL | foo::<X>();
2022-02-14 13:25:26 +01:00
| +++++
error: aborting due to 1 previous error
2024-06-17 08:34:26 +00:00
For more information about this error, try `rustc --explain E0284`.