Skip to content

Commit

Permalink
Add regression test for rust-lang#71547
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Okushi <[email protected]>
  • Loading branch information
JohnTitor committed Jul 19, 2022
1 parent 29c5a02 commit 50423ae
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/ui/const-generics/issues/issue-71547.rs
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit 50423ae

Please sign in to comment.