]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/issue_99325.rs
Rollup merge of #103236 - tspiteri:redoc-int-adc-sbb, r=m-ou-se
[rust.git] / tests / mir-opt / issue_99325.rs
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.built.after.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 }