Skip to content

Commit 238d03b

Browse files
committed
never_type: test interaction with auto traits
1 parent 089229a commit 238d03b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/test/ui/never_type/auto-traits.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// check-pass
2+
3+
#![feature(optin_builtin_traits)]
4+
5+
fn main() {
6+
enum Void {}
7+
8+
auto trait Auto {}
9+
fn assert_auto<T: Auto>() {}
10+
assert_auto::<Void>();
11+
assert_auto::<!>();
12+
13+
fn assert_send<T: Send>() {}
14+
assert_send::<Void>();
15+
assert_send::<!>();
16+
}

0 commit comments

Comments
 (0)