Skip to content

Commit

Permalink
Rollup merge of rust-lang#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 rust-lang#30724, needs to mention that type parameter defaults
are legal in trait and type definitions too.
  • Loading branch information
steveklabnik committed Jan 23, 2016
2 parents 1201943 + 9d77694 commit 68e51c3
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 68e51c3

Please sign in to comment.