Skip to content
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

Merged
merged 2 commits into from
Sep 30, 2020

Conversation

arora-aman
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 22, 2020
Copy link
Member

@davidtwco davidtwco left a 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.

compiler/rustc_middle/src/ty/print/pretty.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/ty/print/pretty.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/ty/print/pretty.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/ty/print/pretty.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/ty/print/pretty.rs Outdated Show resolved Hide resolved
}
if !self.tcx().sess.verbose() {
p!(write("generator"));
// FIXME(eddyb) should use `def_span`.
Copy link
Member

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?

Copy link
Member Author

@arora-aman arora-aman Sep 23, 2020

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.

compiler/rustc_middle/src/ty/print/pretty.rs Show resolved Hide resolved
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() {
Copy link
Member Author

@arora-aman arora-aman Sep 24, 2020

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.

@bors
Copy link
Contributor

bors commented Sep 26, 2020

☔ 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:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

arora-aman and others added 2 commits September 28, 2020 01:27
Co-authored-by: Dhruv Jauhar <dhruvjhr@gmail.com>
Co-authored-by: Logan Mosier <logmosier@gmail.com>
Co-authored-by: Dhruv Jauhar <dhruvjhr@gmail.com>
Co-authored-by: Logan Mosier <logmosier@gmail.com>
@arora-aman
Copy link
Member Author

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@arora-aman
Copy link
Member Author

@davidtwco updated

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 29, 2020

📌 Commit adda0cd has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 29, 2020
@bors
Copy link
Contributor

bors commented Sep 30, 2020

⌛ Testing commit adda0cd with merge 6ac6c67...

@bors
Copy link
Contributor

bors commented Sep 30, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: nikomatsakis
Pushing 6ac6c67 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 30, 2020
@bors bors merged commit 6ac6c67 into rust-lang:master Sep 30, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 30, 2020
@arora-aman arora-aman deleted the closure_print_2 branch September 30, 2020 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update pretty.rs
6 participants