Skip to content

Commit 5430e55

Browse files
committed
E0110 update error format
1 parent e804a3c commit 5430e55

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/librustc/middle/astconv_util.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
2929
break;
3030
}
3131
for lifetime in segment.parameters.lifetimes() {
32-
span_err!(self.sess, lifetime.span, E0110,
33-
"lifetime parameters are not allowed on this type");
32+
struct_span_err!(self.sess, lifetime.span, E0110,
33+
"lifetime parameters are not allowed on this type")
34+
.span_label(lifetime.span,
35+
&format!("lifetime parameter not allowed on this type"))
36+
.emit();
3437
break;
3538
}
3639
for binding in segment.parameters.bindings() {

src/test/compile-fail/E0110.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
type X = u32<'static>; //~ ERROR E0110
12+
//~| NOTE lifetime parameter not allowed on this type
1213

1314
fn main() {
1415
}

0 commit comments

Comments
 (0)