Skip to content

Commit

Permalink
Rollup merge of rust-lang#35266 - circuitfox:35247-E0109-update-error…
Browse files Browse the repository at this point in the history
…-format, r=jonathandturner

E0109 Update error format

Fixes rust-lang#35247 as part of rust-lang#35233.

r? @jonathandturner
  • Loading branch information
GuillaumeGomez authored Aug 5, 2016
2 parents 158597f + c89e278 commit 9186db8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc/middle/astconv_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
pub fn prohibit_type_params(self, segments: &[ast::PathSegment]) {
for segment in segments {
for typ in segment.parameters.types() {
span_err!(self.sess, typ.span, E0109,
"type parameters are not allowed on this type");
struct_span_err!(self.sess, typ.span, E0109,
"type parameters are not allowed on this type")
.span_label(typ.span, &format!("type parameter not allowed"))
.emit();
break;
}
for lifetime in segment.parameters.lifetimes() {
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/E0109.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

type X = u32<i32>; //~ ERROR E0109
//~| NOTE type parameter not allowed

fn main() {
}

0 comments on commit 9186db8

Please sign in to comment.