rust/tests/crashes/129095.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
397 B
Rust
Raw Normal View History

2024-08-15 22:44:16 +02:00
//@ known-bug: rust-lang/rust#129095
//@ compile-flags: -Zmir-enable-passes=+GVN -Zmir-enable-passes=+Inline -Zvalidate-mir
2024-08-15 22:44:16 +02: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() {
assert_eq!(function_with_bytes::<b"AAAAA">(), &[0x41, 0x41, 0x41, 0x41]);
2024-08-15 22:44:16 +02:00
}