-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19e51aa
commit 25cb1af
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`. |