diff options
Diffstat (limited to 'tests/ui/const-generics/issues/issue-71547.rs')
-rw-r--r-- | tests/ui/const-generics/issues/issue-71547.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/const-generics/issues/issue-71547.rs b/tests/ui/const-generics/issues/issue-71547.rs new file mode 100644 index 000000000..60776a1a9 --- /dev/null +++ b/tests/ui/const-generics/issues/issue-71547.rs @@ -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() {} |