未验证 提交 16ad2f50 编写于 作者: M Matthias Krüger 提交者: GitHub

Rollup merge of #99004 - TaKO8Ki:add-test-for-70408, r=Mark-Simulacrum

Add a test for #70408

closes #70408
// build-pass
#![feature(adt_const_params)]
#![allow(incomplete_features)]
pub fn function_with_bytes<const BYTES: &'static [u8; 4]>() -> &'static [u8] {
BYTES
}
pub fn main() {
assert_eq!(function_with_bytes::<b"AAAA">(), &[0x41, 0x41, 0x41, 0x41]);
assert_eq!(function_with_bytes::<{ &[0x41, 0x41, 0x41, 0x41] }>(), b"AAAA");
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册