1
Fork 0

Rollup merge of #69687 - Centril:bm-inconsistent-wording, r=estebank

resolve, inconsistent binding mode: tweak wording

Now that we can have e.g. `let Ok(x) | Err(x) = res;`, it's no longer appropriate to refer to "the same *match arm*", so let's tweak the wording.

r? @estebank
This commit is contained in:
Mazdak Farrokhzad 2020-03-07 17:27:27 +01:00 committed by GitHub
commit 289c3a5f6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 74 additions and 74 deletions

View file

@ -4,7 +4,7 @@ pub fn main() {
let x = &Some((3, 3));
let _: &i32 = match x {
Some((x, 3)) | &Some((ref x, 5)) => x,
//~^ ERROR is bound in inconsistent ways
//~^ ERROR is bound inconsistently
_ => &5i32,
};
}

View file

@ -1,4 +1,4 @@
error[E0409]: variable `x` is bound in inconsistent ways within the same match arm
error[E0409]: variable `x` is bound inconsistently across alternatives separated by `|`
--> $DIR/issue-44912-or.rs:6:35
|
LL | Some((x, 3)) | &Some((ref x, 5)) => x,