]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/matches.stderr
Better binding name on Err for note
[rust.git] / tests / ui / matches.stderr
index 75d050f316b551fd24df8cb9fca86f0b024d5615..dd8014073df73c5f2b37e214d3c93795dc56519e 100644 (file)
@@ -78,37 +78,45 @@ LL |         Ok(3) => println!("ok"),
    |         ^^^^^
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
+error: `Err(_e)` will match all errors, maybe not a good idea
+  --> $DIR/matches.rs:34:9
+   |
+LL |         Err(_e) => panic!(),
+   |         ^^^^^^^
+   |
+   = note: to remove this warning, match each error separately or use `unreachable!` macro
+
 error: this `match` has identical arm bodies
-  --> $DIR/matches.rs:34:18
+  --> $DIR/matches.rs:33:18
    |
 LL |         Ok(_) => println!("ok"),
    |                  ^^^^^^^^^^^^^^
    |
 note: same as this
-  --> $DIR/matches.rs:33:18
+  --> $DIR/matches.rs:32:18
    |
 LL |         Ok(3) => println!("ok"),
    |                  ^^^^^^^^^^^^^^
 help: consider refactoring into `Ok(3) | Ok(_)`
-  --> $DIR/matches.rs:33:9
+  --> $DIR/matches.rs:32:9
    |
 LL |         Ok(3) => println!("ok"),
    |         ^^^^^
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: this `match` has identical arm bodies
-  --> $DIR/matches.rs:41:18
+  --> $DIR/matches.rs:40:18
    |
 LL |         Ok(_) => println!("ok"),
    |                  ^^^^^^^^^^^^^^
    |
 note: same as this
-  --> $DIR/matches.rs:40:18
+  --> $DIR/matches.rs:39:18
    |
 LL |         Ok(3) => println!("ok"),
    |                  ^^^^^^^^^^^^^^
 help: consider refactoring into `Ok(3) | Ok(_)`
-  --> $DIR/matches.rs:40:9
+  --> $DIR/matches.rs:39:9
    |
 LL |         Ok(3) => println!("ok"),
    |         ^^^^^
@@ -133,58 +141,94 @@ LL |         Ok(3) => println!("ok"),
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: this `match` has identical arm bodies
+  --> $DIR/matches.rs:54:18
+   |
+LL |         Ok(_) => println!("ok"),
+   |                  ^^^^^^^^^^^^^^
+   |
+note: same as this
   --> $DIR/matches.rs:53:18
    |
+LL |         Ok(3) => println!("ok"),
+   |                  ^^^^^^^^^^^^^^
+help: consider refactoring into `Ok(3) | Ok(_)`
+  --> $DIR/matches.rs:53:9
+   |
+LL |         Ok(3) => println!("ok"),
+   |         ^^^^^
+   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
+
+error: this `match` has identical arm bodies
+  --> $DIR/matches.rs:60:18
+   |
+LL |         Ok(_) => println!("ok"),
+   |                  ^^^^^^^^^^^^^^
+   |
+note: same as this
+  --> $DIR/matches.rs:59:18
+   |
+LL |         Ok(3) => println!("ok"),
+   |                  ^^^^^^^^^^^^^^
+help: consider refactoring into `Ok(3) | Ok(_)`
+  --> $DIR/matches.rs:59:9
+   |
+LL |         Ok(3) => println!("ok"),
+   |         ^^^^^
+   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
+
+error: this `match` has identical arm bodies
+  --> $DIR/matches.rs:66:18
+   |
 LL |         Ok(_) => println!("ok"),
    |                  ^^^^^^^^^^^^^^
    |
 note: same as this
-  --> $DIR/matches.rs:52:18
+  --> $DIR/matches.rs:65:18
    |
 LL |         Ok(3) => println!("ok"),
    |                  ^^^^^^^^^^^^^^
 help: consider refactoring into `Ok(3) | Ok(_)`
-  --> $DIR/matches.rs:52:9
+  --> $DIR/matches.rs:65:9
    |
 LL |         Ok(3) => println!("ok"),
    |         ^^^^^
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: this `match` has identical arm bodies
-  --> $DIR/matches.rs:76:29
+  --> $DIR/matches.rs:89:29
    |
 LL |         (Ok(_), Some(x)) => println!("ok {}", x),
    |                             ^^^^^^^^^^^^^^^^^^^^
    |
 note: same as this
-  --> $DIR/matches.rs:75:29
+  --> $DIR/matches.rs:88:29
    |
 LL |         (Ok(x), Some(_)) => println!("ok {}", x),
    |                             ^^^^^^^^^^^^^^^^^^^^
 help: consider refactoring into `(Ok(x), Some(_)) | (Ok(_), Some(x))`
-  --> $DIR/matches.rs:75:9
+  --> $DIR/matches.rs:88:9
    |
 LL |         (Ok(x), Some(_)) => println!("ok {}", x),
    |         ^^^^^^^^^^^^^^^^
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: this `match` has identical arm bodies
-  --> $DIR/matches.rs:91:18
+  --> $DIR/matches.rs:104:18
    |
 LL |         Ok(_) => println!("ok"),
    |                  ^^^^^^^^^^^^^^
    |
 note: same as this
-  --> $DIR/matches.rs:90:18
+  --> $DIR/matches.rs:103:18
    |
 LL |         Ok(3) => println!("ok"),
    |                  ^^^^^^^^^^^^^^
 help: consider refactoring into `Ok(3) | Ok(_)`
-  --> $DIR/matches.rs:90:9
+  --> $DIR/matches.rs:103:9
    |
 LL |         Ok(3) => println!("ok"),
    |         ^^^^^
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
-error: aborting due to 12 previous errors
+error: aborting due to 15 previous errors