Skip to content

Commit 429ae93

Browse files
committed
some comment about not infering static lifetimes test
1 parent 44df365 commit 429ae93

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@
1212

1313
#![feature(infer_outlives_requirements)]
1414

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+
1521
struct Foo<U> {
16-
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]
1723
}
1824
struct Bar<T: 'static> {
1925
x: T,

0 commit comments

Comments
 (0)