mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
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:
commit
d7a65a5558
18
src/test/ui/const-generics/issues/issue-71547.rs
Normal file
18
src/test/ui/const-generics/issues/issue-71547.rs
Normal 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() {}
|
Loading…
Reference in New Issue
Block a user