summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-consts/double-elided.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/associated-consts/double-elided.rs')
-rw-r--r--tests/ui/associated-consts/double-elided.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/associated-consts/double-elided.rs b/tests/ui/associated-consts/double-elided.rs
new file mode 100644
index 000000000..fd0317781
--- /dev/null
+++ b/tests/ui/associated-consts/double-elided.rs
@@ -0,0 +1,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() {}