Code change:
<!-- Thank you for filing a bug report! Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. If you cannot produce a minimal reproduction case (something that would work in isolation), please provide the steps or even link to a repository that causes the problematic output to occur. --Given the following code: The current output is: <!-- The following is not always necessary. --Ideally the output should look like: When a user called with an annotation, it's helpful to suggest too. <!-- If the problem is not self-explanatory, please provide a rationale for the change. --<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOT_END --
If it's ok, I would like to give a shot. If you plan to work on it, please go ahead.
It's yours :)
claim
Hi, I would like to ask a question... I'm reading the code now and am thinking of extending the error messages by adding to . My plan is that start adding some fields (like ty::TraitRef) to and dbg! the output to get the value of trait information like for a new error message. Is my approach out of line or is there a better approach for that.
You don't have to hold information of in because we can get the info on-demand by the combination of and . Say you'd add a method of , the code will be something like this: For getting the name of the trait in question, or will be handy for you.
I appreciate your answer.
are you still working on this? :)

Related discussion:
text: <ins> error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-89064.rs:17:16 | LL |     let _ = A::foo::<S>(); |                ^^^ expected 0 generic arguments | note: associated function defined here, with 0 generic parameters --> $DIR/issue-89064.rs:4:8 | LL |     fn foo() {} |        ^^^ help: consider moving this generic argument to the `A` trait, which takes up to 1 argument | LL -     let _ = A::foo::<S>(); LL +     let _ = A::<S>::foo(); | help: remove these generics | LL -     let _ = A::foo::<S>(); LL +     let _ = A::foo(); | error[E0107]: this associated function takes 0 generic arguments but 2 generic arguments were supplied --> $DIR/issue-89064.rs:22:16 | LL |     let _ = B::bar::<S, S>(); |                ^^^ expected 0 generic arguments | note: associated function defined here, with 0 generic parameters --> $DIR/issue-89064.rs:8:8 | LL |     fn bar() {} |        ^^^ help: consider moving these generic arguments to the `B` trait, which takes up to 2 arguments | LL -     let _ = B::bar::<S, S>(); LL +     let _ = B::<S, S>::bar(); | help: remove these generics | LL -     let _ = B::bar::<S, S>(); LL +     let _ = B::bar(); | error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-89064.rs:27:21 | LL |     let _ = A::<S>::foo::<S>(); |                     ^^^----- help: remove these generics |                     | |                     expected 0 generic arguments | note: associated function defined here, with 0 generic parameters --> $DIR/issue-89064.rs:4:8 | LL |     fn foo() {} |        ^^^ error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-89064.rs:31:16 | LL |     let _ = 42.into::<Option<_>>(); |                ^^^^ expected 0 generic arguments | note: associated function defined here, with 0 generic parameters --> $SRC_DIR/core/src/convert/mod.rs:LL:COL | LL |     fn into(self) -> T; |        ^^^^ help: consider moving this generic argument to the `Into` trait, which takes up to 1 argument | LL |     let _ = Into::<Option<_>>::into(42); |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: remove these generics | LL -     let _ = 42.into::<Option<_>>(); LL +     let _ = 42.into(); | error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0107`. </ins>