Skip to content

Use structured suggestion when telling user about for<'a> #113177

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

estebank
Copy link
Contributor

error[E0637]: `&` without an explicit lifetime name cannot be used here
  --> $DIR/E0637.rs:13:13
   |
LL |     T: Into<&u32>,
   |             ^ explicit lifetime name needed here
   |
help: consider introducing a higher-ranked lifetime here
   |
LL |     T: for<'a> Into<&'a u32>,
   |        +++++++       ++

@rustbot
Copy link
Collaborator

rustbot commented Jun 30, 2023

r? @davidtwco

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 30, 2023
```
error[E0637]: `&` without an explicit lifetime name cannot be used here
  --> $DIR/E0637.rs:13:13
   |
LL |     T: Into<&u32>,
   |             ^ explicit lifetime name needed here
   |
help: consider introducing a higher-ranked lifetime here
   |
LL |     T: for<'a> Into<&'a u32>,
   |        +++++++       ++
```
@compiler-errors
Copy link
Member

hope this doesn't have any false positives (well, incorrect suggestions) but from the UI tests it looks fine I guess

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 30, 2023

📌 Commit 7d33094 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors 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 Jun 30, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jun 30, 2023
Use structured suggestion when telling user about `for<'a>`

```
error[E0637]: `&` without an explicit lifetime name cannot be used here
  --> $DIR/E0637.rs:13:13
   |
LL |     T: Into<&u32>,
   |             ^ explicit lifetime name needed here
   |
help: consider introducing a higher-ranked lifetime here
   |
LL |     T: for<'a> Into<&'a u32>,
   |        +++++++       ++
```
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 30, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#107624 (Stabilize `const_cstr_methods`)
 - rust-lang#111403 (suggest `slice::swap` for `mem::swap(&mut x[0], &mut x[1])` borrowck error)
 - rust-lang#113071 (Account for late-bound vars from parent arg-position impl trait)
 - rust-lang#113165 (Encode item bounds for `DefKind::ImplTraitPlaceholder`)
 - rust-lang#113171 (Properly implement variances_of for RPITIT GAT)
 - rust-lang#113177 (Use structured suggestion when telling user about `for<'a>`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 207b244 into rust-lang:master Jun 30, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 30, 2023
@estebank estebank deleted the hrlt-sugg branch November 9, 2023 05:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants