2024-06-17 08:34:26 +00:00
|
|
|
error[E0284]: type annotations needed
|
2021-08-27 18:04:57 +02:00
|
|
|
--> $DIR/uninferred-consts.rs:9:9
|
2020-08-09 05:01:19 +00:00
|
|
|
|
|
|
|
|
|
LL | Foo.foo();
|
2023-02-21 14:11:08 -07:00
|
|
|
| ^^^ cannot infer the value of the const parameter `A` declared on the method `foo`
|
2020-10-08 22:23:01 +02:00
|
|
|
|
|
2024-06-19 08:25:58 +00:00
|
|
|
note: required by a const generic parameter in `Foo::foo`
|
2024-06-17 08:34:26 +00:00
|
|
|
--> $DIR/uninferred-consts.rs:6:12
|
|
|
|
|
|
|
|
|
|
|
LL | fn foo<const A: usize, const B: usize>(self) {}
|
2024-06-19 08:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^ required by this const generic parameter in `Foo::foo`
|
2024-06-17 08:34:26 +00:00
|
|
|
help: consider specifying the generic arguments
|
|
|
|
|
|
|
|
|
|
|
LL | Foo.foo::<A, B>();
|
|
|
|
|
| ++++++++
|
|
|
|
|
|
|
|
|
|
error[E0284]: type annotations needed
|
|
|
|
|
--> $DIR/uninferred-consts.rs:9:9
|
|
|
|
|
|
|
|
|
|
|
LL | Foo.foo();
|
|
|
|
|
| ^^^ cannot infer the value of the const parameter `B` declared on the method `foo`
|
|
|
|
|
|
|
2024-06-19 08:25:58 +00:00
|
|
|
note: required by a const generic parameter in `Foo::foo`
|
2024-06-17 08:34:26 +00:00
|
|
|
--> $DIR/uninferred-consts.rs:6:28
|
|
|
|
|
|
|
|
|
|
|
LL | fn foo<const A: usize, const B: usize>(self) {}
|
2024-06-19 08:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^ required by this const generic parameter in `Foo::foo`
|
2022-02-14 13:25:26 +01:00
|
|
|
help: consider specifying the generic arguments
|
2020-10-08 22:23:01 +02:00
|
|
|
|
|
2022-02-14 13:25:26 +01:00
|
|
|
LL | Foo.foo::<A, B>();
|
|
|
|
|
| ++++++++
|
2020-08-09 05:01:19 +00:00
|
|
|
|
2024-06-17 08:34:26 +00:00
|
|
|
error: aborting due to 2 previous errors
|
2020-08-09 05:01:19 +00:00
|
|
|
|
2024-06-17 08:34:26 +00:00
|
|
|
For more information about this error, try `rustc --explain E0284`.
|