]> git.lizzy.rs Git - rust.git/blob - src/test/auxiliary/reexported_static_methods.rs
Rollup merge of #28991 - goyox86:goyox86/rustfmting-liblog-II, r=alexcrichton
[rust.git] / src / test / auxiliary / reexported_static_methods.rs
1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
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
11 pub use sub_foo::Foo;
12 pub use self::Bar as Baz;
13 pub use sub_foo::Boz;
14 pub use sub_foo::Bort;
15
16 pub trait Bar {
17     fn bar() -> Self;
18 }
19
20 impl Bar for isize {
21     fn bar() -> isize { 84 }
22 }
23
24 pub mod sub_foo {
25     pub trait Foo {
26         fn foo() -> Self;
27     }
28
29     impl Foo for isize {
30         fn foo() -> isize { 42 }
31     }
32
33     pub struct Boz {
34         unused_str: String
35     }
36
37     impl Boz {
38         pub fn boz(i: isize) -> bool {
39             i > 0
40         }
41     }
42
43     pub enum Bort {
44         Bort1,
45         Bort2
46     }
47
48     impl Bort {
49         pub fn bort() -> String {
50             "bort()".to_string()
51         }
52     }
53 }