Skip to content

Commit 1e241ce

Browse files
committed
Test case for issue rust-lang#4202
1 parent 9042e1e commit 1e241ce

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
13+
pub mod sub_foo {
14+
pub trait Foo {
15+
pub fn foo() -> Self;
16+
}
17+
18+
impl Foo for int {
19+
pub fn foo() -> int { 42 }
20+
}
21+
}
22+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
// xfail-fast
12+
// aux-build:mod_trait_with_static_methods_lib.rs
13+
extern mod mod_trait_with_static_methods_lib;
14+
15+
use mod_trait_with_static_methods_lib::Foo;
16+
17+
pub fn main() {
18+
assert!(42 == Foo::foo());
19+
}

0 commit comments

Comments
 (0)