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 ?Sized where bound not being displayed at the correct place #46786

Merged
merged 1 commit into from
Dec 19, 2017

Conversation

GuillaumeGomez
Copy link
Member

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 17, 2017
for type_params in &mut g.type_params {
if &type_params.name == name {
*bounds = type_params.bounds.clone();
type_params.bounds.clear();
Copy link
Member

Choose a reason for hiding this comment

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

You could simply move the ownership away, either with

*bounds = mem::replace(&mut type_params.bounds, HirVec::new())

or, since bounds.is_empty(),

mem::swap(&mut bounds, &mut type_params.bounds);

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh nice!

@GuillaumeGomez
Copy link
Member Author

Updated.

@QuietMisdreavus
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 18, 2017

📌 Commit 0df39bf has been approved by QuietMisdreavus

@kennytm kennytm 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 Dec 18, 2017
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 18, 2017
… r=QuietMisdreavus

Fix ?Sized where bound not being displayed at the correct place

Fixes rust-lang#46726.

r? @QuietMisdreavus
bors added a commit that referenced this pull request Dec 19, 2017
Rollup of 11 pull requests

- Successful merges: #46700, #46786, #46790, #46800, #46801, #46802, #46804, #46805, #46812, #46824, #46825
- Failed merges:
@bors bors merged commit 0df39bf into rust-lang:master Dec 19, 2017
@GuillaumeGomez GuillaumeGomez deleted the fix-sized-rendering branch December 19, 2017 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants