Skip to content

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
Contributor

r? @arielb1

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

@nham nham force-pushed the zero-elided-lifetimes branch from dc9bab2 to 36ff0a9 Compare May 18, 2016 06:49
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.
@nham nham force-pushed the zero-elided-lifetimes branch from 36ff0a9 to 7fef162 Compare May 18, 2016 06:50
true
} else {
false
};
Copy link
Contributor

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
Contributor

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
Contributor

sanxiyn commented May 19, 2016

@bors r+

@bors
Copy link
Collaborator

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