Skip to content

Commit

Permalink
Add test for issue #78671
Browse files Browse the repository at this point in the history
  • Loading branch information
marmeladema committed Apr 20, 2021
1 parent 19e51aa commit 25cb1af
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/ui/generic-associated-types/issue-78671.rs
@@ -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() {}
19 changes: 19 additions & 0 deletions src/test/ui/generic-associated-types/issue-78671.stderr
@@ -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`.

0 comments on commit 25cb1af

Please sign in to comment.