blob: a9dd0bf6c06c042613fc47e52f3c8ae8a1c3aa90 [file] [edit]
//@ run-pass
//@ reference: expr.tuple.unary-tuple-restriction
//@ reference: patterns.tuple.syntax
//@ reference: statement.let.syntax
//@ reference: type.tuple.restriction
// 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');
}