summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/issue-31808.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/issue-31808.rs')
-rw-r--r--tests/rustdoc/issue-31808.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/rustdoc/issue-31808.rs b/tests/rustdoc/issue-31808.rs
new file mode 100644
index 000000000..e55c5bd4f
--- /dev/null
+++ b/tests/rustdoc/issue-31808.rs
@@ -0,0 +1,11 @@
+// Test that associated item impls on primitive types don't crash rustdoc
+
+pub trait Foo {
+ const BAR: usize;
+ type BAZ;
+}
+
+impl Foo for () {
+ const BAR: usize = 0;
+ type BAZ = usize;
+}