Rollup merge of #99481 - JohnTitor:issue-71547, r=compiler-errors

Add regression test for #71547

Closes #71547
r? `@compiler-errors`

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
This commit is contained in:
Dylan DPC 2022-07-20 11:29:41 +05:30 committed by GitHub
commit d7a65a5558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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() {}