blob: fd0317781bb151ec5489b4a0aa3bfd4602938fa7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
struct S;
impl S {
const C: &&str = &"";
//~^ WARN `&` without an explicit lifetime name cannot be used here
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
//~| WARN `&` without an explicit lifetime name cannot be used here
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
//~| ERROR in type `&&str`, reference has a longer lifetime than the data it references
}
fn main() {}
|