Rollup merge of #35835 - crypto-universe:E0426, r=jonathandturner

New format for E0426

Issue #35799 as a part of issue #35233
r? jonathandturner
This commit is contained in:
Jonathan Turner 2016-08-22 15:34:20 -07:00 committed by GitHub
commit ae83225afc
2 changed files with 10 additions and 6 deletions

View File

@ -392,11 +392,13 @@ fn resolve_struct_error<'b, 'a: 'b, 'c>(resolver: &'b Resolver<'a>,
err
}
ResolutionError::UndeclaredLabel(name) => {
struct_span_err!(resolver.session,
span,
E0426,
"use of undeclared label `{}`",
name)
let mut err = struct_span_err!(resolver.session,
span,
E0426,
"use of undeclared label `{}`",
name);
err.span_label(span, &format!("undeclared label `{}`",&name));
err
}
ResolutionError::SelfImportsOnlyAllowedWithin => {
struct_span_err!(resolver.session,

View File

@ -10,6 +10,8 @@
fn main () {
loop {
break 'a; //~ ERROR E0426
break 'a;
//~^ ERROR E0426
//~| NOTE undeclared label `'a`
}
}