3 #![feature(adt_const_params)]
4 #![allow(incomplete_features)]
6 pub fn function_with_str
<const STRING
: &'
static str>() -> &'
static str {
10 pub fn function_with_bytes
<const BYTES
: &'
static [u8]>() -> &'
static [u8] {
15 assert_eq
!(function_with_str
::<"Rust">(), "Rust");
16 assert_eq
!(function_with_str
::<"ℇ㇈↦">(), "ℇ㇈↦");
17 assert_eq
!(function_with_bytes
::<b
"AAAA">(), &[0x41, 0x41, 0x41, 0x41]);
18 assert_eq
!(function_with_bytes
::<{&[0x41, 0x41, 0x41, 0x41]}
>(), b
"AAAA");