Skip to content

Commit

Permalink
Rollup merge of #35299 - circuitfox:E0110-update-error-format, r=jona…
Browse files Browse the repository at this point in the history
…thandturner

E0110 update error format

Fixes #35248

Part of #35233

r? @jonathandturner
  • Loading branch information
steveklabnik authored Aug 4, 2016
2 parents 3d9003d + 5430e55 commit 59a2293
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 59a2293

Please sign in to comment.