diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-08-05 16:12:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-05 16:12:58 +0200 |
| commit | 84d467c5f99bbf474c8c8373bcca063f03e8ad43 (patch) | |
| tree | f8aa3a8c73a8c540e402dcbd5e863a2caa907c5d | |
| parent | 65a283fac18f21da9836e763abc5be3be5014702 (diff) | |
| parent | 5430e555f5eba563a8f99c8ebab641abfb0642c8 (diff) | |
| download | rust-84d467c5f99bbf474c8c8373bcca063f03e8ad43.tar.gz rust-84d467c5f99bbf474c8c8373bcca063f03e8ad43.zip | |
Rollup merge of #35299 - circuitfox:E0110-update-error-format, r=jonathandturner
E0110 update error format Fixes #35248 Part of #35233 r? @jonathandturner
| -rw-r--r-- | src/librustc/middle/astconv_util.rs | 7 | ||||
| -rw-r--r-- | src/test/compile-fail/E0110.rs | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/librustc/middle/astconv_util.rs b/src/librustc/middle/astconv_util.rs index f9a05056a7c..0a5f6884af9 100644 --- a/src/librustc/middle/astconv_util.rs +++ b/src/librustc/middle/astconv_util.rs @@ -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() { diff --git a/src/test/compile-fail/E0110.rs b/src/test/compile-fail/E0110.rs index fd169f4acc5..5a9e7a43de9 100644 --- a/src/test/compile-fail/E0110.rs +++ b/src/test/compile-fail/E0110.rs @@ -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() { } |
