about summary refs log tree commit diff
diff options
context:
space:
mode:
authortoidiu <apoorv@toidiu.com>2018-07-26 20:32:01 -0400
committertoidiu <apoorv@toidiu.com>2018-07-26 20:32:01 -0400
commit429ae93c09055a1fde14ef4cbf807bdfcbe65584 (patch)
treed5cb1febd3883df1281971368b019751fbac6cdc
parent44df36567b91388e677ff29f6ac3fe5a4f9ab001 (diff)
downloadrust-429ae93c09055a1fde14ef4cbf807bdfcbe65584.tar.gz
rust-429ae93c09055a1fde14ef4cbf807bdfcbe65584.zip
some comment about not infering static lifetimes test
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs
index c7017011277..72d5127c294 100644
--- a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs
+++ b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs
@@ -12,8 +12,14 @@
 
 #![feature(infer_outlives_requirements)]
 
+/*
+ * We don't infer `T: 'static` outlives relationships by default.
+ * Instead an additional feature gate `infer_static_outlives_requirements`
+ * is required.
+ */
+
 struct Foo<U> {
-    bar: Bar<U> //~ ERROR 16:5: 16:16: the parameter type `U` may not live long enough [E0310]
+    bar: Bar<U> //~ ERROR 22:5: 22:16: the parameter type `U` may not live long enough [E0310]
 }
 struct Bar<T: 'static> {
     x: T,