]>
Commit | Line | Data |
---|---|---|
064997fb FG |
1 | #![feature(adt_const_params)] |
2 | #![allow(incomplete_features)] | |
3 | ||
4 | pub fn function_with_bytes<const BYTES: &'static [u8; 4]>() -> &'static [u8] { | |
5 | BYTES | |
6 | } | |
7 | ||
8 | // EMIT_MIR issue_99325.main.mir_map.0.mir | |
9 | pub fn main() { | |
10 | assert_eq!(function_with_bytes::<b"AAAA">(), &[0x41, 0x41, 0x41, 0x41]); | |
11 | assert_eq!(function_with_bytes::<{ &[0x41, 0x41, 0x41, 0x41] }>(), b"AAAA"); | |
12 | } |