diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-07-20 06:42:35 +0900 |
|---|---|---|
| committer | Yuki Okushi <jtitor@2k36.org> | 2022-07-20 06:42:35 +0900 |
| commit | 50423aedce823635060fe30fb903b51aa448d04c (patch) | |
| tree | 2ec9668e7ab9bab33c97bc645142821526db0bfd | |
| parent | 29c5a028b0c92aa5da6a8eb6d6585a389fcf1035 (diff) | |
| download | rust-50423aedce823635060fe30fb903b51aa448d04c.tar.gz rust-50423aedce823635060fe30fb903b51aa448d04c.zip | |
Add regression test for #71547
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
| -rw-r--r-- | src/test/ui/const-generics/issues/issue-71547.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/issues/issue-71547.rs b/src/test/ui/const-generics/issues/issue-71547.rs new file mode 100644 index 00000000000..60776a1a985 --- /dev/null +++ b/src/test/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() {} |
