Rollup merge of #30997 - bluss:trait-default, r=nikomatsakis

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:
Steve Klabnik 2016-01-23 09:38:41 -05:00
commit e598b43243

View File

@ -1918,8 +1918,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."));
}
}