-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggest annotating traits rather than methods when appropriate #89064
Comments
@hkmatsumoto If it's ok, I would like to give a shot. If you plan to work on it, please go ahead. |
It's yours :) |
@rustbot claim |
Hi, I would like to ask a question... |
You don't have to hold information of let trait_: Option<DefId> = self.tcx.trait_of_item(self.def_id);
let generics: &Generics = self.tcx.generics_of(trait_.unwrap()); For getting the name of the trait in question, |
I appreciate your answer. |
@chansuke are you still working on this? :) |
…-when-appropriate, r=davidtwco Suggest moving redundant generic args of an assoc fn to its trait Closes rust-lang#89064
…-when-appropriate, r=davidtwco Suggest moving redundant generic args of an assoc fn to its trait Closes rust-lang#89064
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d2a32fe1f3460b6583534eb53d045165
The current output is:
Ideally the output should look like:
When a user called
into()
with an annotation, it's helpful to suggestT::from(_)
too.The text was updated successfully, but these errors were encountered: