blob: 4a234f3a68114b2015218d5c1f29a4e730f224f5 [file] [log] [blame]
//! Regression test for https://github.com/rust-lang/rust/issues/14229
//@ run-pass
trait Foo: Sized {
fn foo(self) {}
}
trait Bar: Sized {
fn bar(self) {}
}
struct S;
impl<'l> Foo for &'l S {}
impl<T: Foo> Bar for T {}
fn main() {
let s = S;
s.foo();
(&s).bar();
s.bar();
}