Files
rust/tests/ui/const-generics/infer/method-chain.stderr

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

20 lines
730 B
Plaintext
Raw Normal View History

2024-06-17 08:34:26 +00:00
error[E0284]: type annotations needed
--> $DIR/method-chain.rs:15:33
|
2020-09-14 09:45:02 +02:00
LL | Foo.bar().bar().bar().bar().baz();
| ^^^ cannot infer the value of the const parameter `N` declared on the method `baz`
|
note: required by a const generic parameter in `Foo::baz`
2024-06-17 08:34:26 +00:00
--> $DIR/method-chain.rs:8:12
|
LL | fn baz<const N: usize>(self) -> Foo {
| ^^^^^^^^^^^^^^ required by this const generic parameter in `Foo::baz`
2022-02-14 13:25:26 +01:00
help: consider specifying the generic argument
|
LL | Foo.bar().bar().bar().bar().baz::<N>();
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`.