rust/tests/ui/issues/issue-14229.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
232 B
Rust
Raw Normal View History

// run-pass
2015-07-20 12:31:54 +00:00
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();
}