diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index eb204c5641495..224565e713b60 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -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.")); } }