]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-78671.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / generic-associated-types / issue-78671.rs
1 // revisions: base extended
2
3 #![feature(generic_associated_types)]
4 #![cfg_attr(extended, feature(generic_associated_types_extended))]
5 #![cfg_attr(extended, allow(incomplete_features))]
6
7 trait CollectionFamily {
8     type Member<T>;
9 }
10 fn floatify() {
11     Box::new(Family) as &dyn CollectionFamily<Member=usize>
12     //~^ ERROR: missing generics for associated type
13     //[base]~^^ ERROR: the trait `CollectionFamily` cannot be made into an object
14 }
15
16 struct Family;
17
18 fn main() {}