From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/traits/parameterized-with-bounds.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/test/ui/traits/parameterized-with-bounds.rs (limited to 'src/test/ui/traits/parameterized-with-bounds.rs') diff --git a/src/test/ui/traits/parameterized-with-bounds.rs b/src/test/ui/traits/parameterized-with-bounds.rs new file mode 100644 index 000000000..832d4f6c8 --- /dev/null +++ b/src/test/ui/traits/parameterized-with-bounds.rs @@ -0,0 +1,21 @@ +// run-pass +// pretty-expanded FIXME #23616 + +#![allow(dead_code)] + + +trait A { fn get(self) -> T; } +trait B { fn get(self) -> (T,U); } +trait C<'a, U> { fn get(self) -> &'a U; } + +mod foo { + pub trait D<'a, T> { fn get(self) -> &'a T; } +} + +fn foo1(_: &(dyn A + Send)) {} +fn foo2(_: Box + Send + Sync>) {} +fn foo3(_: Box + 'static>) {} +fn foo4<'a, T>(_: Box + 'static + Send>) {} +fn foo5<'a, T>(_: Box + 'static + Send>) {} + +pub fn main() {} -- cgit v1.2.3