]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/parameterized-with-bounds.rs
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / traits / parameterized-with-bounds.rs
1 // run-pass
2 // pretty-expanded FIXME #23616
3
4 #![allow(dead_code)]
5
6
7 trait A<T> { fn get(self) -> T; }
8 trait B<T, U> { fn get(self) -> (T,U); }
9 trait C<'a, U> { fn get(self) -> &'a U; }
10
11 mod foo {
12     pub trait D<'a, T> { fn get(self) -> &'a T; }
13 }
14
15 fn foo1<T>(_: &(dyn A<T> + Send)) {}
16 fn foo2<T>(_: Box<dyn A<T> + Send + Sync>) {}
17 fn foo3<T>(_: Box<dyn B<isize, usize> + 'static>) {}
18 fn foo4<'a, T>(_: Box<dyn C<'a, T> + 'static + Send>) {}
19 fn foo5<'a, T>(_: Box<dyn foo::D<'a, T> + 'static + Send>) {}
20
21 pub fn main() {}