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

Only print parameters with elided lifetimes in elision error messages. #33708

Merged
merged 2 commits into from
May 19, 2016

Conversation

nham
Copy link
Contributor

@nham nham commented May 18, 2016

When displaying the function parameters for a lifetime elision error message,
this changes it to first filter out the parameters that don't have elided
lifetimes.

Fixes #30255.

@rust-highfive
Copy link
Collaborator

r? @arielb1

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

When displaying the function parameters for a lifetime elision error message,
this changes it to first filter out the parameters that don't have elided
lifetimes.

Fixes rust-lang#30255.
true
} else {
false
};
Copy link
Member

Choose a reason for hiding this comment

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

This is just let any_lifetimes = elided_len > 0.

Copy link
Member

Choose a reason for hiding this comment

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

Better, replace !any_lifetimes below with elided_len == 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I've done this.

@sanxiyn
Copy link
Member

sanxiyn commented May 19, 2016

@bors r+

@bors
Copy link
Contributor

bors commented May 19, 2016

📌 Commit a50c82b has been approved by sanxiyn

Manishearth added a commit to Manishearth/rust that referenced this pull request May 19, 2016
Only print parameters with elided lifetimes in elision error messages.

When displaying the function parameters for a lifetime elision error message,
this changes it to first filter out the parameters that don't have elided
lifetimes.

Fixes rust-lang#30255.
bors added a commit that referenced this pull request May 19, 2016
Rollup of 10 pull requests

- Successful merges: #33353, #33611, #33696, #33698, #33705, #33708, #33712, #33720, #33721, #33730
- Failed merges:
@bors bors merged commit a50c82b into rust-lang:master May 19, 2016
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