Fix type parameter default error to mention type and trait definitions
Introduced in PR #30724, needs to mention that type parameter defaults are legal in trait and type definitions too.
This commit is contained in:
parent
bff52927f5
commit
9d77694d5d
1 changed files with 2 additions and 2 deletions
|
@ -1922,8 +1922,8 @@ fn get_or_create_type_parameter_def<'a,'tcx>(ccx: &CrateCtxt<'a,'tcx>,
|
|||
lint::builtin::INVALID_TYPE_PARAM_DEFAULT,
|
||||
param.id,
|
||||
param.span,
|
||||
format!("defaults for type parameters are only allowed on type definitions, \
|
||||
like `struct` or `enum`"));
|
||||
format!("defaults for type parameters are only allowed in `struct`, \
|
||||
`enum`, `type`, or `trait` definitions."));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue