diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-12-04 16:25:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-04 16:25:33 +0100 |
| commit | f2e223c5768bb67863ca9e761695ecf581927796 (patch) | |
| tree | 6002ca702cf0850fd2485816547fdd34193110e6 /src/test | |
| parent | b1816833bd9f0d38c1866e883c261aafe1767485 (diff) | |
| parent | 8a7ae23f75953cfb9ba1e07cc37be8455ac979c3 (diff) | |
Rollup merge of #105224 - cjgillot:issue-104240, r=compiler-errors
Properly substitute inherent associated types. Fixes https://github.com/rust-lang/rust/issues/104240
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/associated-inherent-types/struct-generics.rs | 15 |
1 files changed, 15 insertions, 0 deletions
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>(T); + +impl<T> S<T> { + type P = T; +} + +fn main() { + type A = S<()>::P; + let _: A = (); +} |
