]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/one-tuple.rs
Rollup merge of #58306 - GuillaumeGomez:crate-browser-history, r=QuietMisdreavus
[rust.git] / src / test / run-pass / one-tuple.rs
1 // Why one-tuples? Because macros.
2
3
4 pub fn main() {
5     match ('c',) {
6         (x,) => {
7             assert_eq!(x, 'c');
8         }
9     }
10     // test the 1-tuple type too
11     let x: (char,) = ('d',);
12     let (y,) = x;
13     assert_eq!(y, 'd');
14 }