about summary refs log tree commit diff
path: root/tests/ui/generics
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-06-30 00:30:50 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-06-30 00:34:14 +0000
commit7d33094d3aa9c9ef2f376ed0dff026a6bc402dbb (patch)
tree159c0646948f65e9fb664ca9647d884f66bd73b6 /tests/ui/generics
parent54d6738a8df74382c439e1dfb9ce4e2382d7742e (diff)
downloadrust-7d33094d3aa9c9ef2f376ed0dff026a6bc402dbb.tar.gz
rust-7d33094d3aa9c9ef2f376ed0dff026a6bc402dbb.zip
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>,
   |        +++++++       ++
```
Diffstat (limited to 'tests/ui/generics')
-rw-r--r--tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.stderr7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.stderr b/tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.stderr
index faf4c9eb872..bcd1fbc55ed 100644
--- a/tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.stderr
+++ b/tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.stderr
@@ -4,11 +4,10 @@ error[E0637]: `&` without an explicit lifetime name cannot be used here
 LL | fn should_error<T>() where T : Into<&u32> {}
    |                                     ^ explicit lifetime name needed here
    |
-help: consider introducing a higher-ranked lifetime here with `for<'a>`
-  --> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:5:32
+help: consider introducing a higher-ranked lifetime here
    |
-LL | fn should_error<T>() where T : Into<&u32> {}
-   |                                ^
+LL | fn should_error<T>() where T : for<'a> Into<&'a u32> {}
+   |                                +++++++       ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:9:20