From 8a7ae23f75953cfb9ba1e07cc37be8455ac979c3 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sat, 3 Dec 2022 19:08:00 +0000 Subject: Properly substitute inherent associated types. --- src/test/ui/associated-inherent-types/struct-generics.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/ui/associated-inherent-types/struct-generics.rs (limited to 'src/test') diff --git a/src/test/ui/associated-inherent-types/struct-generics.rs b/src/test/ui/associated-inherent-types/struct-generics.rs new file mode 100644 index 00000000000..8952b379173 --- /dev/null +++ b/src/test/ui/associated-inherent-types/struct-generics.rs @@ -0,0 +1,15 @@ +// check-pass + +#![feature(inherent_associated_types)] +#![allow(incomplete_features)] + +struct S(T); + +impl S { + type P = T; +} + +fn main() { + type A = S<()>::P; + let _: A = (); +} -- cgit 1.4.1-3-g733a5