summaryrefslogtreecommitdiffstats
path: root/tests/ui/unconstrained-ref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unconstrained-ref.rs')
-rw-r--r--tests/ui/unconstrained-ref.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/unconstrained-ref.rs b/tests/ui/unconstrained-ref.rs
new file mode 100644
index 000000000..473ca954b
--- /dev/null
+++ b/tests/ui/unconstrained-ref.rs
@@ -0,0 +1,7 @@
+struct S<'a, T:'a> {
+ o: &'a Option<T>
+}
+
+fn main() {
+ S { o: &None }; //~ ERROR type annotations needed [E0282]
+}