Add regression test for #71547

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
This commit is contained in:
Yuki Okushi 2022-07-20 06:42:35 +09:00
parent 29c5a028b0
commit 50423aedce
No known key found for this signature in database
GPG Key ID: 379CEEFDD63E5DD7

View File

@ -0,0 +1,18 @@
// check-pass
#![feature(adt_const_params)]
#![allow(incomplete_features)]
pub trait GetType<const N: &'static str> {
type Ty;
fn get(&self) -> &Self::Ty;
}
pub fn get_val<T>(value: &T) -> &T::Ty
where
T: GetType<"hello">,
{
value.get()
}
fn main() {}