-
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.rs: Update Closure and Generator print #77069
Conversation
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.
LGTM, some minor comments/inconsistencies that might be fine but I'd like to check.
} | ||
if !self.tcx().sess.verbose() { | ||
p!(write("generator")); | ||
// FIXME(eddyb) should use `def_span`. |
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.
Out of curiosity, did you try using def_span
here?
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.
Didn't try def_span, I guess I could've. I was mostly trying to keep changes minimal to non-verbose mode with this PR. Main motivation is to remove printing upvar_tys for non-verbose.
343ba38
to
1fb5eca
Compare
p!(write(" upvar_tys=(")); | ||
let mut uninferred_ty = | ||
substs.as_generator().upvar_tys().filter(|ty| ty.is_ty_infer()); | ||
if uninferred_ty.next().is_some() { |
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.
Won't need this check when rust-lang/project-rfc-2229#4 is implemented, because then the is_valid() check itself will fail because the tupled_upvar_tys
will be an inference variable.
☔ The latest upstream changes (presumably #76176) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
Co-authored-by: Dhruv Jauhar <[email protected]> Co-authored-by: Logan Mosier <[email protected]>
Co-authored-by: Dhruv Jauhar <[email protected]> Co-authored-by: Logan Mosier <[email protected]>
1fb5eca
to
adda0cd
Compare
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
@davidtwco updated |
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.
LGTM
@bors r+ |
📌 Commit adda0cd has been approved by |
☀️ Test successful - checks-actions, checks-azure |
More detailed outline: rust-lang/project-rfc-2229#17
Closes: rust-lang/project-rfc-2229#11
r? @nikomatsakis
cc @eddyb @davidtwco @estebank