]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/issue-99325.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / mir-opt / issue-99325.rs
CommitLineData
064997fb
FG
1#![feature(adt_const_params)]
2#![allow(incomplete_features)]
3
4pub 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
9pub 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}