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

Fix pretty-printing of lifetime bound #34547

Merged
merged 1 commit into from
Jul 1, 2016
Merged

Conversation

sanxiyn
Copy link
Member

@sanxiyn sanxiyn commented Jun 29, 2016

Fix #34527.

@rust-highfive
Copy link
Collaborator

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@pnkfelix
Copy link
Member

@sanxiyn Thanks for taking this on!

I would prefer if we factored the code a bit more so that we didn't duplicate the lifetime-bound printing loop; you can see the other loop in the fn print_lifetime_def method; I'd just pull that out into a fn print_lifetime_bounds method.

Can you try doing that instead?

@sanxiyn
Copy link
Member Author

sanxiyn commented Jun 29, 2016

Done.


// pp-exact

fn f1<'a, 'b, 'c>(_x: &'a u32, _y: &'b u32, _z: &'c u32) where 'c: 'a + 'b { }
Copy link
Member

Choose a reason for hiding this comment

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

(now that I look at it, I wonder if the right convention would be to print 'c: 'a+'b instead of 'c: 'a + 'b. But I'm not going to let that question hold up this PR.)

@pnkfelix
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 29, 2016

📌 Commit 3c29fc5 has been approved by pnkfelix

jseyfried added a commit to jseyfried/rust that referenced this pull request Jun 30, 2016
bors added a commit that referenced this pull request Jun 30, 2016
Rollup of 5 pull requests

 - Successful merges: #34105, #34305, #34512, ~~#34531,~~ #34547
@bors bors merged commit 3c29fc5 into rust-lang:master Jul 1, 2016
@sanxiyn sanxiyn deleted the pretty-lifetime branch July 4, 2016 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants