mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Add regression test for #71547
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
This commit is contained in:
parent
29c5a028b0
commit
50423aedce
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