Add test for issue #78671

This commit is contained in:
marmeladema 2021-04-20 23:41:40 +01:00
parent 19e51aaef7
commit 25cb1af7b2
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#![allow(incomplete_features)]
#![feature(generic_associated_types)]
trait CollectionFamily {
type Member<T>;
//~^ ERROR: missing generics for associated type
}
fn floatify() {
Box::new(Family) as &dyn CollectionFamily<Member=usize>
}
struct Family;
fn main() {}

View File

@ -0,0 +1,19 @@
error[E0107]: missing generics for associated type `CollectionFamily::Member`
--> $DIR/issue-78671.rs:5:10
|
LL | type Member<T>;
| ^^^^^^ expected 1 type argument
|
note: associated type defined here, with 1 type parameter: `T`
--> $DIR/issue-78671.rs:5:10
|
LL | type Member<T>;
| ^^^^^^ -
help: use angle brackets to add missing type argument
|
LL | type Member<T><T>;
| ^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0107`.