Skip to content

Commit

Permalink
Auto merge of #30997 - bluss:trait-default, r=nikomatsakis
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Jan 23, 2016
2 parents 1571c69 + 9d77694 commit b78b9ae
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 @@ -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."));
}
}

Expand Down

0 comments on commit b78b9ae

Please sign in to comment.