From 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:39 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs (limited to 'tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs') diff --git a/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs b/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs new file mode 100644 index 000000000..5407fb6dd --- /dev/null +++ b/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs @@ -0,0 +1,12 @@ +// Test that multiple lifetimes are allowed in impl trait types. +// build-pass (FIXME(62277): could be check-pass?) + +trait X<'x>: Sized {} + +impl X<'_> for U {} + +fn multiple_lifeteimes<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl X<'b> + 'a { + x +} + +fn main() {} -- cgit v1.2.3