Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
steveklabnik authored Aug 4, 2016
2 parents 3d9003d + 5430e55 commit 59a2293
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
@@ -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() {
1 change: 1 addition & 0 deletions src/test/compile-fail/E0110.rs
Original file line number Diff line number Diff line change
@@ -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.