Content-Length: 24475 | pFad | https://doc.rust-lang.org/std/string/../error/../string/../net/../rc/../../error_codes/./E0416.html

E0416 - Error codes index

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error code E0416

An identifier is bound more than once in a pattern.

Erroneous code example:

#![allow(unused)]
fn main() {
match (1, 2) {
    (x, x) => {} // error: identifier `x` is bound more than once in the
                 //        same pattern
}
}

Please verify you didn’t misspell identifiers’ name. Example:

#![allow(unused)]
fn main() {
match (1, 2) {
    (x, y) => {} // ok!
}
}

Or maybe did you mean to unify? Consider using a guard:

#![allow(unused)]
fn main() {
let (A, B, C) = (1, 2, 3);
match (A, B, C) {
    (x, x2, see) if x == x2 => { /* A and B are equal, do one thing */ }
    (y, z, see) => { /* A and B not equal; do another thing */ }
}
}








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/std/string/../error/../string/../net/../rc/../../error_codes/./E0416.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy