2024-08-15 22:44:16 +02:00
|
|
|
//@ known-bug: rust-lang/rust#129095
|
2024-12-08 16:52:32 +01:00
|
|
|
//@ compile-flags: -Zmir-enable-passes=+GVN -Zmir-enable-passes=+Inline -Zvalidate-mir
|
2024-08-15 22:44:16 +02:00
|
|
|
|
2025-02-20 02:21:58 +00:00
|
|
|
#![feature(adt_const_params, unsized_const_params)]
|
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
2024-08-15 22:44:16 +02:00
|
|
|
pub fn function_with_bytes<const BYTES: &'static [u8; 4]>() -> &'static [u8] {
|
|
|
|
BYTES
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {
|
2025-02-20 02:21:58 +00:00
|
|
|
assert_eq!(function_with_bytes::<b"AAAAA">(), &[0x41, 0x41, 0x41, 0x41]);
|
2024-08-15 22:44:16 +02:00
|
|
|
}
|