2 // Tests "capabilities" granted by traits that inherit from super-
3 // builtin-kinds, e.g., if a trait requires Send to implement, then
4 // at usage site of that trait, we know we have the Send capability.
7 use std
::sync
::mpsc
::{channel, Sender, Receiver}
;
11 impl <T
: Send
> Foo
for T { }
13 fn foo
<T
: Foo
+ '
static>(val
: T
, chan
: Sender
<T
>) {
14 chan
.send(val
).unwrap();
18 let (tx
, rx
): (Sender
<isize>, Receiver
<isize>) = channel();
20 assert_eq
!(rx
.recv().unwrap(), 31337);