Rollup merge of #35266 - circuitfox:35247-E0109-update-error-format, r=jonathandturner

E0109 Update error format

Fixes #35247 as part of #35233.

r? @jonathandturner
This commit is contained in:
Guillaume Gomez 2016-08-05 16:12:56 +02:00 committed by GitHub
commit 9186db86fd
2 changed files with 5 additions and 2 deletions

View File

@ -24,8 +24,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
pub fn prohibit_type_params(self, segments: &[ast::PathSegment]) {
for segment in segments {
for typ in segment.parameters.types() {
span_err!(self.sess, typ.span, E0109,
"type parameters are not allowed on this type");
struct_span_err!(self.sess, typ.span, E0109,
"type parameters are not allowed on this type")
.span_label(typ.span, &format!("type parameter not allowed"))
.emit();
break;
}
for lifetime in segment.parameters.lifetimes() {

View File

@ -9,6 +9,7 @@
// except according to those terms.
type X = u32<i32>; //~ ERROR E0109
//~| NOTE type parameter not allowed
fn main() {
}