]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tuple/builtin.rs
Add tuple trait tests
[rust.git] / src / test / ui / tuple / builtin.rs
1 // check-pass
2
3 #![feature(tuple_trait)]
4
5 fn assert_is_tuple<T: std::marker::Tuple + ?Sized>() {}
6
7 struct Unsized([u8]);
8
9 fn from_param_env<T: std::marker::Tuple + ?Sized>() {
10     assert_is_tuple::<T>();
11 }
12
13 fn main() {
14     assert_is_tuple::<()>();
15     assert_is_tuple::<(i32,)>();
16     assert_is_tuple::<(Unsized,)>();
17     from_param_env::<()>();
18     from_param_env::<(i32,)>();
19     from_param_env::<(Unsized,)>();
20 }