]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-14229.rs
Rollup merge of #92942 - Xaeroxe:raw_arg, r=dtolnay
[rust.git] / src / test / ui / issues / issue-14229.rs
1 // run-pass
2 trait Foo: Sized {
3     fn foo(self) {}
4 }
5
6 trait Bar: Sized {
7     fn bar(self) {}
8 }
9
10 struct S;
11
12 impl<'l> Foo for &'l S {}
13
14 impl<T: Foo> Bar for T {}
15
16 fn main() {
17     let s = S;
18     s.foo();
19     (&s).bar();
20     s.bar();
21 }