Skip to content

Update lifetime errors to specifically note temporaries - #36171

Merged
bors merged 1 commit into
rust-lang:masterfrom
sophiajt:temporary_value
Sep 3, 2016
Merged

Update lifetime errors to specifically note temporaries#36171
bors merged 1 commit into
rust-lang:masterfrom
sophiajt:temporary_value

Conversation

@sophiajt

Copy link
Copy Markdown
Contributor

This PR updates the error message we give in the case of a temporary value not living long enough.

Before:

screen shot 2016-08-31 at 10 02 47 am

Now:

screen shot 2016-08-31 at 10 03 01 am

Specifically, it makes the following changes:

  • Detects if a temporary is being used. If so, it changes the labels to mention that a temporary value specifically is in question
  • Simplifies wording of the existing labels to focus on lifetimes rather than values being valid
  • Changes the help to a note, since the help+span wasn't as helpful (and sometimes more confusing) than just a note.

r? @nikomatsakis

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: can we make this a UI test?

@nikomatsakis

Copy link
Copy Markdown
Contributor

@jonathandturner r=me if we move the "suggestions" to a ui test, which seems like a better fit :)

@sophiajt

Copy link
Copy Markdown
ContributorAuthor

@bors r=nikomatsakis

@bors

bors commented Aug 31, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 5112b40 has been approved by nikomatsakis

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Trailing whitespace. make tidy won't be happy.

@sophiajt

Copy link
Copy Markdown
ContributorAuthor

@bors r=nikomatsakis

@bors

bors commented Sep 1, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 439afcd has been approved by nikomatsakis

@sophiajt

Copy link
Copy Markdown
ContributorAuthor

@frewsxcv - thanks for the catch with tidy :)

@sophiajt

Copy link
Copy Markdown
ContributorAuthor

@bors rollup

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
…nikomatsakis
Update lifetime errors to specifically note temporaries
This PR updates the error message we give in the case of a temporary value not living long enough.
Before:
<img width="497" alt="screen shot 2016-08-31 at 10 02 47 am" src="https://cloud.githubusercontent.com/assets/547158/18138551/27a06794-6f62-11e6-9ee2-bdf8bed75ca7.png">
Now:
<img width="488" alt="screen shot 2016-08-31 at 10 03 01 am" src="https://cloud.githubusercontent.com/assets/547158/18138557/2e5cf322-6f62-11e6-9047-4a78abf3d78c.png">
Specifically, it makes the following changes:
* Detects if a temporary is being used. If so, it changes the labels to mention that a temporary value specifically is in question
* Simplifies wording of the existing labels to focus on lifetimes rather than values being valid
* Changes the help to a note, since the help+span wasn't as helpful (and sometimes more confusing) than just a note.
r? @nikomatsakis
@sophiajtsophiajt mentioned this pull request Sep 2, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
…nikomatsakis
Update lifetime errors to specifically note temporaries
This PR updates the error message we give in the case of a temporary value not living long enough.
Before:
<img width="497" alt="screen shot 2016-08-31 at 10 02 47 am" src="https://cloud.githubusercontent.com/assets/547158/18138551/27a06794-6f62-11e6-9ee2-bdf8bed75ca7.png">
Now:
<img width="488" alt="screen shot 2016-08-31 at 10 03 01 am" src="https://cloud.githubusercontent.com/assets/547158/18138557/2e5cf322-6f62-11e6-9047-4a78abf3d78c.png">
Specifically, it makes the following changes:
* Detects if a temporary is being used. If so, it changes the labels to mention that a temporary value specifically is in question
* Simplifies wording of the existing labels to focus on lifetimes rather than values being valid
* Changes the help to a note, since the help+span wasn't as helpful (and sometimes more confusing) than just a note.
r? @nikomatsakis
@sophiajtsophiajt mentioned this pull request Sep 2, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
…nikomatsakis
Update lifetime errors to specifically note temporaries
This PR updates the error message we give in the case of a temporary value not living long enough.
Before:
<img width="497" alt="screen shot 2016-08-31 at 10 02 47 am" src="https://cloud.githubusercontent.com/assets/547158/18138551/27a06794-6f62-11e6-9ee2-bdf8bed75ca7.png">
Now:
<img width="488" alt="screen shot 2016-08-31 at 10 03 01 am" src="https://cloud.githubusercontent.com/assets/547158/18138557/2e5cf322-6f62-11e6-9047-4a78abf3d78c.png">
Specifically, it makes the following changes:
* Detects if a temporary is being used. If so, it changes the labels to mention that a temporary value specifically is in question
* Simplifies wording of the existing labels to focus on lifetimes rather than values being valid
* Changes the help to a note, since the help+span wasn't as helpful (and sometimes more confusing) than just a note.
r? @nikomatsakis
@sophiajtsophiajt mentioned this pull request Sep 2, 2016
bors added a commit that referenced this pull request Sep 3, 2016
@bors
bors merged commit 439afcd into rust-lang:masterSep 3, 2016
@nikomatsakis

Copy link
Copy Markdown
Contributor

Yay :)

Sign up for freeto 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.

4 participants

@sophiajt@nikomatsakis@bors@frewsxcv