Changed error message E0408 to new format
r? @jonathandturner
This commit is contained in:
parent
147371f58f
commit
595b754a4b
4 changed files with 12 additions and 8 deletions
|
|
@ -12,7 +12,7 @@ fn main() {
|
|||
let x = Some(0);
|
||||
|
||||
match x {
|
||||
Some(y) | None => {} //~ ERROR E0408
|
||||
_ => ()
|
||||
Some(y) | None => {} //~ ERROR variable `y` from pattern #1 is not bound in pattern #2
|
||||
_ => () //~| NOTE pattern doesn't bind `y`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ mod bar {
|
|||
fn main() {
|
||||
use bar::foo::{alpha, charlie};
|
||||
match alpha {
|
||||
alpha | beta => {} //~ ERROR variable `beta` from pattern #2 is not bound in pattern #1
|
||||
charlie => {}
|
||||
alpha | beta => {} //~ ERROR variable `beta` from pattern #2 is not bound in pattern #1
|
||||
charlie => {} //~| NOTE pattern doesn't bind `beta`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@
|
|||
fn main() {
|
||||
let y = 1;
|
||||
match y {
|
||||
a | b => {} //~ ERROR variable `a` from pattern #1 is not bound in pattern #2
|
||||
//~^ ERROR variable `b` from pattern #2 is not bound in pattern #1
|
||||
a | b => {} //~ ERROR variable `a` from pattern #1 is not bound in pattern #2
|
||||
//~^ ERROR variable `b` from pattern #2 is not bound in pattern #1
|
||||
//~| NOTE pattern doesn't bind `a`
|
||||
//~| NOTE pattern doesn't bind `b`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue