]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0637.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / error-codes / E0637.rs
1 fn underscore_lifetime<'_>(str1: &'_ str, str2: &'_ str) -> &'_ str {
2     //~^ ERROR: `'_` cannot be used here [E0637]
3     //~| ERROR: missing lifetime specifier
4     if str1.len() > str2.len() {
5         str1
6     } else {
7         str2
8     }
9 }
10
11 fn and_without_explicit_lifetime<T>()
12 where
13     T: Into<&u32>, //~ ERROR: `&` without an explicit lifetime name cannot be used here [E0637]
14 {
15 }
16
17 fn main() {}