diff options
| author | Michael Howell <michael@notriddle.com> | 2023-10-16 18:02:11 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-10-16 18:02:11 -0700 |
| commit | 94b39e8c86f3b07e39e8541ef4417c260ec13eab (patch) | |
| tree | 0203417349c018730909d4d5067b31b37964972a /tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs | |
| parent | 43b493ebc06f298c8d781f3f0b5a21acbfebd013 (diff) | |
| download | rust-94b39e8c86f3b07e39e8541ef4417c260ec13eab.tar.gz rust-94b39e8c86f3b07e39e8541ef4417c260ec13eab.zip | |
rustdoc: move ICE test to rustdoc-ui
Diffstat (limited to 'tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs')
| -rw-r--r-- | tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs b/tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs new file mode 100644 index 00000000000..9c0e404cf76 --- /dev/null +++ b/tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs @@ -0,0 +1,14 @@ +// Test that associated item impls on primitive types don't crash rustdoc + +// https://github.com/rust-lang/rust/issues/31808 +#![crate_name="issue_31808"] + +pub trait Foo { + const BAR: usize; + type BAZ; +} + +impl Foo for () { + const BAR: usize = 0; + type BAZ = usize; +} |
