about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorEljay <lee@leejeffery.co.uk>2015-09-19 00:58:36 +0100
committerEljay <lee@leejeffery.co.uk>2015-09-19 00:58:36 +0100
commitf4f95eb3a9f2c3c38679db84aabbb7cdb46d2641 (patch)
treebd28b50dbe6271a91907bb004754cf71f4019703 /src/test
parentfb5de8ce57a36e504af2dd6626365d94b5f4262d (diff)
downloadrust-f4f95eb3a9f2c3c38679db84aabbb7cdb46d2641.tar.gz
rust-f4f95eb3a9f2c3c38679db84aabbb7cdb46d2641.zip
Remove unnecessary trait accessibility check.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/issue-16264.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-16264.rs b/src/test/run-pass/issue-16264.rs
new file mode 100644
index 00000000000..67701de6386
--- /dev/null
+++ b/src/test/run-pass/issue-16264.rs
@@ -0,0 +1,27 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use outer::Foo;
+
+mod outer {
+    pub use self::inner::Foo;
+
+    mod inner {
+        pub trait Foo {
+            fn bar(&self) {}
+        }
+        impl Foo for i32 {}
+    }
+}
+
+fn main() {
+    let x: i32 = 0;
+    x.bar();
+}