]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tuple/one-tuple.rs
Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyup
[rust.git] / src / test / ui / tuple / one-tuple.rs
1 // run-pass
2 // Why one-tuples? Because macros.
3
4
5 pub fn main() {
6     match ('c',) {
7         (x,) => {
8             assert_eq!(x, 'c');
9         }
10     }
11     // test the 1-tuple type too
12     let x: (char,) = ('d',);
13     let (y,) = x;
14     assert_eq!(y, 'd');
15 }