Skip to content

Commit 10951bb

Browse files
committed
weak-new-uninhabited-issue-48493
1 parent a927d11 commit 10951bb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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+
16
//@ run-pass
27

8+
enum Void {}
9+
310
fn main() {
4-
enum Void {}
511
let _ = std::rc::Weak::<Void>::new();
612
let _ = std::sync::Weak::<Void>::new();
713
}

0 commit comments

Comments
 (0)