We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44df365 commit 429ae93Copy full SHA for 429ae93
src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs
@@ -12,8 +12,14 @@
12
13
#![feature(infer_outlives_requirements)]
14
15
+/*
16
+ * We don't infer `T: 'static` outlives relationships by default.
17
+ * Instead an additional feature gate `infer_static_outlives_requirements`
18
+ * is required.
19
+ */
20
+
21
struct Foo<U> {
- bar: Bar<U> //~ ERROR 16:5: 16:16: the parameter type `U` may not live long enough [E0310]
22
+ bar: Bar<U> //~ ERROR 22:5: 22:16: the parameter type `U` may not live long enough [E0310]
23
}
24
struct Bar<T: 'static> {
25
x: T,
0 commit comments