New format for E0426

Issue #35799 as a part of issue #35233
?r jonathandturner
This commit is contained in:
crypto-universe 2016-08-19 22:31:31 +02:00
parent 413ada3040
commit 5d02b03059
2 changed files with 10 additions and 6 deletions

View File

@ -390,11 +390,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`
}
}