about summary refs log tree commit diff
path: root/tests/ui/tuple/one-tuple.rs
blob: a9723029e5db53c08a3ce07788ad664ac1c938d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ run-pass
// Why one-tuples? Because macros.


pub fn main() {
    match ('c',) {
        (x,) => {
            assert_eq!(x, 'c');
        }
    }
    // test the 1-tuple type too
    let x: (char,) = ('d',);
    let (y,) = x;
    assert_eq!(y, 'd');
}