diff options
| author | bors <bors@rust-lang.org> | 2016-01-23 14:31:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-01-23 14:31:26 +0000 |
| commit | b78b9ae7b3dd03067c907e7a7ace970a8b26312d (patch) | |
| tree | 407ba25fc2ea8f347f790dd29c06ff2b1dd7f3d1 | |
| parent | 1571c690f0a827d33f0901ef4c3e25cc004ef144 (diff) | |
| parent | 9d77694d5dc318f77b03803879fe04c902709e61 (diff) | |
| download | rust-b78b9ae7b3dd03067c907e7a7ace970a8b26312d.tar.gz rust-b78b9ae7b3dd03067c907e7a7ace970a8b26312d.zip | |
Auto 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.
| -rw-r--r-- | src/librustc_typeck/collect.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 0e095ed674d..db4f8d3a70c 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -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.")); } } |
