diff --git a/src/test/ui/associated-types/defaults-in-other-trait-items-pass.rs b/src/test/ui/associated-types/defaults-in-other-trait-items-pass.rs index 618a2038507..a3bfcd8efe2 100644 --- a/src/test/ui/associated-types/defaults-in-other-trait-items-pass.rs +++ b/src/test/ui/associated-types/defaults-in-other-trait-items-pass.rs @@ -13,10 +13,25 @@ impl Tr for u16 { type Item = u16; } +impl Tr for String { + type Container = String; +} + +impl Tr for usize { + type Item = u32; + type Container = Vec<()>; +} + fn main() { let _container: <() as Tr>::Container = Vec::::new(); let _item: <() as Tr>::Item = 0u8; let _container: ::Container = Vec::::new(); let _item: ::Item = 0u16; + + let _container: ::Container = String::new(); + let _item: ::Item = 0u8; + + let _container: ::Container = Vec::<()>::new(); + let _item: ::Item = 0u32; }