]>
Commit | Line | Data |
---|---|---|
1a4d82fc | 1 | // Copyright 2015 The Rust Project Developers. See the COPYRIGHT |
223e47cc LB |
2 | // file at the top-level directory of this distribution and at |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
54a0048b SL |
11 | // compile-flags: -Cmetadata=aux |
12 | ||
d9579d0f | 13 | use std::ops::Deref; |
85aaf69f | 14 | |
d9579d0f | 15 | pub struct Foo; |
223e47cc | 16 | |
d9579d0f AL |
17 | impl Deref for Foo { |
18 | type Target = i32; | |
19 | fn deref(&self) -> &i32 { loop {} } | |
20 | } | |
21 | ||
22 | pub struct Bar; | |
23 | pub struct Baz; | |
24 | ||
25 | impl Baz { | |
26 | pub fn baz(&self) {} | |
62682a34 | 27 | pub fn static_baz() {} |
d9579d0f AL |
28 | } |
29 | ||
30 | impl Deref for Bar { | |
31 | type Target = Baz; | |
32 | fn deref(&self) -> &Baz { loop {} } | |
c34b1796 | 33 | } |