diff options
Diffstat (limited to 'tests/ui/associated-inherent-types/bugs/lack-of-regionck.rs')
-rw-r--r-- | tests/ui/associated-inherent-types/bugs/lack-of-regionck.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/associated-inherent-types/bugs/lack-of-regionck.rs b/tests/ui/associated-inherent-types/bugs/lack-of-regionck.rs new file mode 100644 index 000000000..632dbf385 --- /dev/null +++ b/tests/ui/associated-inherent-types/bugs/lack-of-regionck.rs @@ -0,0 +1,19 @@ +// known-bug: unknown +// check-pass + +// We currently don't region-check inherent associated type projections at all. + +#![feature(inherent_associated_types)] +#![allow(incomplete_features, dead_code)] + +struct S<T>(T); + +impl S<&'static ()> { + type T = (); +} + +fn usr<'a>() { + let _: S::<&'a ()>::T; // this should *fail* but it doesn't! +} + +fn main() {} |