diff options
Diffstat (limited to 'tests/ui/cross-crate/auxiliary/reexported_static_methods.rs')
-rw-r--r-- | tests/ui/cross-crate/auxiliary/reexported_static_methods.rs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/ui/cross-crate/auxiliary/reexported_static_methods.rs b/tests/ui/cross-crate/auxiliary/reexported_static_methods.rs new file mode 100644 index 000000000..cc961625f --- /dev/null +++ b/tests/ui/cross-crate/auxiliary/reexported_static_methods.rs @@ -0,0 +1,43 @@ +pub use sub_foo::Foo; +pub use self::Bar as Baz; +pub use sub_foo::Boz; +pub use sub_foo::Bort; + +pub trait Bar { + fn bar() -> Self; +} + +impl Bar for isize { + fn bar() -> isize { 84 } +} + +pub mod sub_foo { + pub trait Foo { + fn foo() -> Self; + } + + impl Foo for isize { + fn foo() -> isize { 42 } + } + + pub struct Boz { + unused_str: String + } + + impl Boz { + pub fn boz(i: isize) -> bool { + i > 0 + } + } + + pub enum Bort { + Bort1, + Bort2 + } + + impl Bort { + pub fn bort() -> String { + "bort()".to_string() + } + } +} |