diff options
Diffstat (limited to 'tests/ui/associated-inherent-types/substitute-params.rs')
-rw-r--r-- | tests/ui/associated-inherent-types/substitute-params.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/associated-inherent-types/substitute-params.rs b/tests/ui/associated-inherent-types/substitute-params.rs new file mode 100644 index 000000000..e94d68331 --- /dev/null +++ b/tests/ui/associated-inherent-types/substitute-params.rs @@ -0,0 +1,23 @@ +// check-pass + +#![feature(inherent_associated_types)] +#![allow(incomplete_features)] + +struct S<T>(T); + +impl<T> S<T> { + type P = T; +} + +impl<T> S<(T,)> { + type Un = T; +} + +fn main() { + // Regression test for issue #104240. + type A = S<()>::P; + let _: A = (); + + // Regression test for issue #107468. + let _: S<(i32,)>::Un = 0i32; +} |