about summary refs log tree commit diff
path: root/compiler/rustc_error_codes/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-30 13:13:54 +0000
committerbors <bors@rust-lang.org>2024-04-30 13:13:54 +0000
commit20aa2d81e36036073a9acf418c7d413cb4b22fa6 (patch)
tree940e8f0c9df0d84df08c5955c2f84ca1783c1c3f /compiler/rustc_error_codes/src
parenta7431167e0b8d6ae9fd60650694fbefc3d0fac2f (diff)
parent5a4e83c2e031560849ad1e6ba8f6b78b6e572a8c (diff)
downloadrust-20aa2d81e36036073a9acf418c7d413cb4b22fa6.tar.gz
rust-20aa2d81e36036073a9acf418c7d413cb4b22fa6.zip
Auto merge of #124558 - matthiaskrgr:rollup-axi1bxu, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #123247 (Mention Both HRTB and Generic Lifetime Param in `E0637` documentation)
 - #124511 (Remove many `#[macro_use] extern crate foo` items)
 - #124550 (Remove redundant union check in `KnownPanicsLint` const prop)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_error_codes/src')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0637.md21
1 files changed, 17 insertions, 4 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0637.md b/compiler/rustc_error_codes/src/error_codes/E0637.md
index 62d5565df27..9c2a53f51cf 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0637.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0637.md
@@ -1,5 +1,5 @@
 `'_` lifetime name or `&T` without an explicit lifetime name has been used
-on illegal place.
+in an illegal place.
 
 Erroneous code example:
 
@@ -13,7 +13,14 @@ fn underscore_lifetime<'_>(str1: &'_ str, str2: &'_ str) -> &'_ str {
     }
 }
 
-fn and_without_explicit_lifetime<T>()
+fn without_explicit_lifetime<T>()
+where
+    T: Iterator<Item = &u32>,
+                     //^ `&` without an explicit lifetime name
+{
+}
+
+fn without_hrtb<T>()
 where
     T: Into<&u32>,
           //^ `&` without an explicit lifetime name
@@ -40,9 +47,15 @@ fn underscore_lifetime<'a>(str1: &'a str, str2: &'a str) -> &'a str {
     }
 }
 
-fn and_without_explicit_lifetime<'foo, T>()
+fn without_explicit_lifetime<'a, T>()
+where
+    T: Iterator<Item = &'a u32>,
+{
+}
+
+fn without_hrtb<T>()
 where
-    T: Into<&'foo u32>,
+    T: for<'foo> Into<&'foo u32>,
 {
 }
 ```