summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/issues/issue-71547.rs
blob: 60776a1a985cfd1309ed44754f19d6b2a662f2c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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() {}