]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs
1 // Check that we if we get ahold of an object unsafe trait
2 // object with auto traits and lifetimes, we can downcast it
6 #![feature(object_safe_for_dispatch)]
10 fn downcast_auto(t
: &(dyn Trait
+ Send
)) -> &dyn Trait
{
14 fn downcast_lifetime
<'a
, 'b
, 't
>(t
: &'
a (dyn Trait
+ 't
))
15 -> &'
b (dyn Trait
+ 't
)