]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generic-associated-types/issue-78671.stderr
Update (un)suspicious files
[rustc.git] / src / test / ui / generic-associated-types / issue-78671.stderr
CommitLineData
cdc7bbd5 1error[E0107]: missing generics for associated type `CollectionFamily::Member`
136023e0 2 --> $DIR/issue-78671.rs:7:47
cdc7bbd5 3 |
17df50a5
XL
4LL | Box::new(Family) as &dyn CollectionFamily<Member=usize>
5 | ^^^^^^ expected 1 generic argument
cdc7bbd5 6 |
17df50a5 7note: associated type defined here, with 1 generic parameter: `T`
136023e0 8 --> $DIR/issue-78671.rs:4:10
cdc7bbd5
XL
9 |
10LL | type Member<T>;
11 | ^^^^^^ -
17df50a5 12help: add missing generic argument
cdc7bbd5 13 |
17df50a5 14LL | Box::new(Family) as &dyn CollectionFamily<Member<T>=usize>
94222f64 15 | ~~~~~~~~~
cdc7bbd5
XL
16
17error[E0038]: the trait `CollectionFamily` cannot be made into an object
136023e0 18 --> $DIR/issue-78671.rs:7:25
cdc7bbd5
XL
19 |
20LL | Box::new(Family) as &dyn CollectionFamily<Member=usize>
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `CollectionFamily` cannot be made into an object
22 |
cdc7bbd5 23note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
136023e0 24 --> $DIR/issue-78671.rs:4:10
cdc7bbd5
XL
25 |
26LL | trait CollectionFamily {
27 | ---------------- this trait cannot be made into an object...
28LL | type Member<T>;
29 | ^^^^^^ ...because it contains the generic associated type `Member`
c295e0f8 30 = help: consider moving `Member` to another trait
cdc7bbd5
XL
31
32error: aborting due to 2 previous errors
33
34Some errors have detailed explanations: E0038, E0107.
35For more information about an error, try `rustc --explain E0038`.