Skip to content

Commit d7a65a5

Browse files
authored
Rollup merge of rust-lang#99481 - JohnTitor:issue-71547, r=compiler-errors
Add regression test for rust-lang#71547 Closes rust-lang#71547 r? `@compiler-errors` Signed-off-by: Yuki Okushi <[email protected]>
2 parents feebc5f + 50423ae commit d7a65a5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// check-pass
2+
3+
#![feature(adt_const_params)]
4+
#![allow(incomplete_features)]
5+
6+
pub trait GetType<const N: &'static str> {
7+
type Ty;
8+
fn get(&self) -> &Self::Ty;
9+
}
10+
11+
pub fn get_val<T>(value: &T) -> &T::Ty
12+
where
13+
T: GetType<"hello">,
14+
{
15+
value.get()
16+
}
17+
18+
fn main() {}

0 commit comments

Comments
 (0)