summaryrefslogtreecommitdiffstats
path: root/src/test/ui/tuple/builtin.rs
blob: d87ce526357e3d63223521b98f0a11a0b90aae5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// check-pass

#![feature(tuple_trait)]

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

struct Unsized([u8]);

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

fn main() {
    assert_is_tuple::<()>();
    assert_is_tuple::<(i32,)>();
    assert_is_tuple::<(Unsized,)>();
    from_param_env::<()>();
    from_param_env::<(i32,)>();
    from_param_env::<(Unsized,)>();
}