summaryrefslogtreecommitdiffstats
path: root/src/test/ui/tuple/builtin-fail.rs
blob: 31208096151dcb854f945ca8ffa7a3213cf0ff52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![feature(tuple_trait)]

fn assert_is_tuple<T: std::marker::Tuple + ?Sized>() {}

struct TupleStruct(i32, i32);

fn from_param_env<T>() {
    assert_is_tuple::<T>();
    //~^ ERROR `T` is not a tuple
}

fn main() {
    assert_is_tuple::<i32>();
    //~^ ERROR `i32` is not a tuple
    assert_is_tuple::<(i32)>();
    //~^ ERROR `i32` is not a tuple
    assert_is_tuple::<TupleStruct>();
    //~^ ERROR `TupleStruct` is not a tuple
}