-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Pretty print async fn sugar in opaques and trait bounds #132911
base: master
Are you sure you want to change the base?
Conversation
Could not assign reviewer from: |
let generics = tcx.generics_of(trait_ref.def_id); | ||
let own_args = generics.own_args_no_defaults(tcx, trait_ref.args); | ||
|
||
match (entry.return_ty, own_args[0].expect_ty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have noooooooOOoOooooooo idea wtf was going on here lmao
@@ -1230,51 +1206,48 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { | |||
/// traits map or fn_traits map, depending on if the trait is in the Fn* family of traits. | |||
fn insert_trait_and_projection( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty disappointed with how sensitive to bound var renumbering this is... but 🤷
89b92c5
to
d617f18
Compare
if let Some(return_ty) = entry.return_ty { | ||
self.wrap_binder(&bound_args, |args, cx| { | ||
define_scoped_cx!(cx); | ||
p!(write("{}", tcx.item_name(trait_def_id))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could very easily start making this print like async Fn
in the future.
d617f18
to
d460ffc
Compare
sudo r? fmease