E0110 update error format

This commit is contained in:
Chris Stankus 2016-08-04 10:47:39 -05:00
parent e804a3cf25
commit 5430e555f5
2 changed files with 6 additions and 2 deletions

View File

@ -29,8 +29,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() {

View File

@ -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() {
}