]> git.proxmox.com Git - rustc.git/blame - src/test/auxiliary/issue-19190-3.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / auxiliary / issue-19190-3.rs
CommitLineData
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 13use std::ops::Deref;
85aaf69f 14
d9579d0f 15pub struct Foo;
223e47cc 16
d9579d0f
AL
17impl Deref for Foo {
18 type Target = i32;
19 fn deref(&self) -> &i32 { loop {} }
20}
21
22pub struct Bar;
23pub struct Baz;
24
25impl Baz {
26 pub fn baz(&self) {}
62682a34 27 pub fn static_baz() {}
d9579d0f
AL
28}
29
30impl Deref for Bar {
31 type Target = Baz;
32 fn deref(&self) -> &Baz { loop {} }
c34b1796 33}