]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/builtin-superkinds/builtin-superkinds-capabilities-transitive.rs
2 // Tests "transitivity" of super-builtin-kinds on traits. Here, if
3 // we have a Foo, we know we have a Bar, and if we have a Bar, we
4 // know we have a Send. So if we have a Foo we should know we have
5 // a Send. Basically this just makes sure rustc is using
6 // each_bound_trait_and_supertraits in type_contents correctly.
9 use std
::sync
::mpsc
::{channel, Sender}
;
14 impl <T
: Send
> Foo
for T { }
15 impl <T
: Send
> Bar
for T { }
17 fn foo
<T
: Foo
+ '
static>(val
: T
, chan
: Sender
<T
>) {
18 chan
.send(val
).unwrap();
22 let (tx
, rx
) = channel();
24 assert_eq
!(rx
.recv().unwrap(), 31337);