We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a927d11 commit 10951bbCopy full SHA for 10951bb
tests/ui/allocator/weak-uninhabited-type.rs
@@ -1,7 +1,13 @@
1
+//! Checks that `Weak` pointers can be created with an empty enum type parameter.
2
+//! And generic `Weak` handles zero-variant enums without error.
3
+//!
4
+//! Regression test for <https://github.com/rust-lang/rust/issues/48493>
5
+
6
//@ run-pass
7
8
+enum Void {}
9
10
fn main() {
- enum Void {}
11
let _ = std::rc::Weak::<Void>::new();
12
let _ = std::sync::Weak::<Void>::new();
13
}
0 commit comments