]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/move-generic-to-trait-in-method-with-params.stderr
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / ui / suggestions / move-generic-to-trait-in-method-with-params.stderr
1 error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied
2   --> $DIR/move-generic-to-trait-in-method-with-params.rs:14:7
3    |
4 LL |     1.bar::<i32>(0);
5    |       ^^^ expected 0 generic arguments
6    |
7 note: associated function defined here, with 0 generic parameters
8   --> $DIR/move-generic-to-trait-in-method-with-params.rs:4:8
9    |
10 LL |     fn bar(&self, _: T);
11    |        ^^^
12 help: consider moving this generic argument to the `Foo` trait, which takes up to 1 argument
13    |
14 LL |     Foo::<i32>::bar(1, 0);
15    |     ~~~~~~~~~~~~~~~~~~~~~
16 help: remove these generics
17    |
18 LL -     1.bar::<i32>(0);
19 LL +     1.bar(0);
20    |
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0107`.