Skip to content

Commit

Permalink
Rollup merge of rust-lang#35299 - circuitfox:E0110-update-error-forma…
Browse files Browse the repository at this point in the history
…t, r=jonathandturner

E0110 update error format

Fixes rust-lang#35248

Part of rust-lang#35233

r? @jonathandturner
  • Loading branch information
Jonathan Turner authored Aug 4, 2016
2 parents 6b1213f + 5430e55 commit 9bf7173
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/librustc/middle/astconv_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
break;
}
for lifetime in segment.parameters.lifetimes() {
span_err!(self.sess, lifetime.span, E0110,
"lifetime parameters are not allowed on this type");
struct_span_err!(self.sess, lifetime.span, E0110,
"lifetime parameters are not allowed on this type")
.span_label(lifetime.span,
&format!("lifetime parameter not allowed on this type"))
.emit();
break;
}
for binding in segment.parameters.bindings() {
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/E0110.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<'static>; //~ ERROR E0110
//~| NOTE lifetime parameter not allowed on this type

fn main() {
}

0 comments on commit 9bf7173

Please sign in to comment.