summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-consts/associated-const-public-impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-consts/associated-const-public-impl.rs')
-rw-r--r--src/test/ui/associated-consts/associated-const-public-impl.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/associated-consts/associated-const-public-impl.rs b/src/test/ui/associated-consts/associated-const-public-impl.rs
new file mode 100644
index 000000000..787bee0ff
--- /dev/null
+++ b/src/test/ui/associated-consts/associated-const-public-impl.rs
@@ -0,0 +1,16 @@
+// run-pass
+
+mod bar1 {
+ pub use self::bar2::Foo;
+ mod bar2 {
+ pub struct Foo;
+
+ impl Foo {
+ pub const ID: i32 = 1;
+ }
+ }
+}
+
+fn main() {
+ assert_eq!(1, bar1::Foo::ID);
+}