From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.rs (limited to 'tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.rs') diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.rs b/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.rs new file mode 100644 index 000000000..d3940b13b --- /dev/null +++ b/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.rs @@ -0,0 +1,12 @@ +/* + * We don't infer `T: 'static` outlives relationships. + */ + +struct Foo { + bar: Bar //~ ERROR the parameter type `U` may not live long enough [E0310] +} +struct Bar { + x: T, +} + +fn main() {} -- cgit v1.2.3