]> git.lizzy.rs Git - rust.git/blob - tests/ui/tuple/builtin-fail.rs
Rollup merge of #107455 - tshepang:better-name, r=wesleywiser
[rust.git] / tests / ui / tuple / builtin-fail.rs
1 #![feature(tuple_trait)]
2
3 fn assert_is_tuple<T: std::marker::Tuple + ?Sized>() {}
4
5 struct TupleStruct(i32, i32);
6
7 fn from_param_env<T>() {
8     assert_is_tuple::<T>();
9     //~^ ERROR `T` is not a tuple
10 }
11
12 fn main() {
13     assert_is_tuple::<i32>();
14     //~^ ERROR `i32` is not a tuple
15     assert_is_tuple::<(i32)>();
16     //~^ ERROR `i32` is not a tuple
17     assert_is_tuple::<TupleStruct>();
18     //~^ ERROR `TupleStruct` is not a tuple
19 }