summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs')
-rw-r--r--src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs b/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs
new file mode 100644
index 000000000..e58bba640
--- /dev/null
+++ b/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs
@@ -0,0 +1,16 @@
+// This test ensures that rustdoc does not panic on inherented associated types
+// that are referred to without fully-qualified syntax.
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+pub struct Struct;
+
+impl Struct {
+ pub type AssocTy = usize;
+ pub const AssocConst: Self::AssocTy = 42;
+ //~^ ERROR ambiguous associated type
+ //~| HELP use fully-qualified syntax
+ //~| ERROR ambiguous associated type
+ //~| HELP use fully-qualified syntax
+}