]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/concat-bytes.rs
Rollup merge of #106973 - oli-obk:tait_ice_closure_in_impl_header, r=lcnr
[rust.git] / tests / ui / macros / concat-bytes.rs
1 // run-pass
2 #![feature(concat_bytes)]
3
4 fn main() {
5     assert_eq!(concat_bytes!(), &[]);
6     assert_eq!(
7         concat_bytes!(b'A', b"BC", [68, b'E', 70], [b'G'; 1], [72; 2], [73u8; 3], [65; 0]),
8         b"ABCDEFGHHIII",
9     );
10     assert_eq!(
11         concat_bytes!(
12             concat_bytes!(b"AB", b"CD"),
13             concat_bytes!(b"EF", b"GH"),
14         ),
15         b"ABCDEFGH",
16     );
17 }