summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-inherent-types/assoc-inherent-private.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-inherent-types/assoc-inherent-private.rs')
-rw-r--r--src/test/ui/associated-inherent-types/assoc-inherent-private.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/associated-inherent-types/assoc-inherent-private.rs b/src/test/ui/associated-inherent-types/assoc-inherent-private.rs
new file mode 100644
index 000000000..531581954
--- /dev/null
+++ b/src/test/ui/associated-inherent-types/assoc-inherent-private.rs
@@ -0,0 +1,23 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+mod m {
+ pub struct T;
+ impl T {
+ type P = ();
+ }
+}
+type U = m::T::P; //~ ERROR associated type `P` is private
+
+mod n {
+ pub mod n {
+ pub struct T;
+ impl T {
+ pub(super) type P = bool;
+ }
+ }
+ type U = n::T::P;
+}
+type V = n::n::T::P; //~ ERROR associated type `P` is private
+
+fn main() {}