Skip to content

Commit

Permalink
Fix type parameter default error to mention type and trait definitions
Browse files Browse the repository at this point in the history
Introduced in PR rust-lang#30724, needs to mention that type parameter defaults
are legal in trait and type definitions too.
  • Loading branch information
bluss committed Jan 19, 2016
1 parent bff5292 commit 9d77694
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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."));
}
}

Expand Down

0 comments on commit 9d77694

Please sign in to comment.