diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr')
-rw-r--r-- | src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr b/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr new file mode 100644 index 000000000..a3c607b59 --- /dev/null +++ b/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr @@ -0,0 +1,74 @@ +error: unexpected `,` in pattern + --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:38:17 + | +LL | while let b1, b2, b3 = reading_frame.next().expect("there should be a start codon") { + | ----- ^ + | | + | while parsing the condition of this `while` expression + | +help: try adding parentheses to match on a tuple + | +LL | while let (b1, b2, b3) = reading_frame.next().expect("there should be a start codon") { + | + + + +error: unexpected `,` in pattern + --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:49:14 + | +LL | if let b1, b2, b3 = reading_frame.next().unwrap() { + | ^ + | +help: try adding parentheses to match on a tuple + | +LL | if let (b1, b2, b3) = reading_frame.next().unwrap() { + | + + + +error: unexpected `,` in pattern + --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:59:28 + | +LL | Nucleotide::Adenine, Nucleotide::Cytosine, _ => true + | ^ + | +help: try adding parentheses to match on a tuple... + | +LL | (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true + | + + +help: ...or a vertical bar to match on multiple alternatives + | +LL | Nucleotide::Adenine | Nucleotide::Cytosine | _ => true + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +error: unexpected `,` in pattern + --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:67:10 + | +LL | for x, _barr_body in women.iter().map(|woman| woman.allosomes.clone()) { + | ^ + | +help: try adding parentheses to match on a tuple + | +LL | for (x, _barr_body) in women.iter().map(|woman| woman.allosomes.clone()) { + | + + + +error: unexpected `,` in pattern + --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:75:10 + | +LL | for x, y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) { + | ^ + | +help: try adding parentheses to match on a tuple + | +LL | for (x, y @ Allosome::Y(_)) in men.iter().map(|man| man.allosomes.clone()) { + | + + + +error: unexpected `,` in pattern + --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:84:14 + | +LL | let women, men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned() + | ^ + | +help: try adding parentheses to match on a tuple + | +LL | let (women, men): (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned() + | + + + +error: aborting due to 6 previous errors + |