1 // Tests (negatively) the ability for the Self type in default methods
2 // to use capabilities granted by builtin kinds as supertraits.
4 use std::sync::mpsc::{channel, Sender};
6 trait Foo : Sized+Sync+'static {
7 fn foo(self, mut chan: Sender<Self>) { }
10 impl <T: Sync> Foo for T { }
11 //~^ ERROR the parameter type `T` may not live long enough
14 let (tx, rx) = channel();
16 assert_eq!(rx.recv(), 1193182);