2017-02-07 20:05:30 +00:00
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:21:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
21 | / match ExprNode::Butterflies {
|
|
|
|
22 | | ExprNode::ExprAddrOf => Some(&NODE),
|
|
|
|
23 | | _ => { let x = 5; None },
|
|
|
|
24 | | }
|
2017-07-21 08:40:23 +00:00
|
|
|
| |_____^ help: try this: `if let ExprNode::ExprAddrOf = ExprNode::Butterflies { Some(&NODE) } else { let x = 5; None }`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
= note: `-D single-match-else` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
error: this boolean expression can be simplified
|
|
|
|
--> $DIR/matches.rs:51:11
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
51 | match test && test {
|
|
|
|
| ^^^^^^^^^^^^ help: try: `test`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
= note: `-D nonminimal-bool` implied by `-D warnings`
|
2018-03-28 21:49:32 +00:00
|
|
|
|
2017-02-07 20:05:30 +00:00
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:30:5
|
2017-05-11 11:45:55 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
30 | / match test {
|
|
|
|
31 | | true => 0,
|
|
|
|
32 | | false => 42,
|
|
|
|
33 | | };
|
2017-07-21 08:40:23 +00:00
|
|
|
| |_____^ help: consider using an if/else expression: `if test { 0 } else { 42 }`
|
2017-05-11 11:45:55 +00:00
|
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
= note: `-D match-bool` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:36:5
|
|
|
|
|
|
|
|
|
36 | / match option == 1 {
|
|
|
|
37 | | true => 1,
|
|
|
|
38 | | false => 0,
|
|
|
|
39 | | };
|
|
|
|
| |_____^ help: consider using an if/else expression: `if option == 1 { 1 } else { 0 }`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:41:5
|
|
|
|
|
|
|
|
|
41 | / match test {
|
|
|
|
42 | | true => (),
|
|
|
|
43 | | false => { println!("Noooo!"); }
|
|
|
|
44 | | };
|
|
|
|
| |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:46:5
|
|
|
|
|
|
|
|
|
46 | / match test {
|
|
|
|
47 | | false => { println!("Noooo!"); }
|
|
|
|
48 | | _ => (),
|
|
|
|
49 | | };
|
|
|
|
| |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:51:5
|
|
|
|
|
|
|
|
|
51 | / match test && test {
|
|
|
|
52 | | false => { println!("Noooo!"); }
|
|
|
|
53 | | _ => (),
|
|
|
|
54 | | };
|
|
|
|
| |_____^ help: consider using an if/else expression: `if !(test && test) { println!("Noooo!"); }`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:51:11
|
|
|
|
|
|
|
|
|
51 | match test && test {
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D eq-op` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:56:5
|
|
|
|
|
|
|
|
|
56 | / match test {
|
|
|
|
57 | | false => { println!("Noooo!"); }
|
|
|
|
58 | | true => { println!("Yes!"); }
|
|
|
|
59 | | };
|
|
|
|
| |_____^ help: consider using an if/else expression: `if test { println!("Yes!"); } else { println!("Noooo!"); }`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you don't need to add `&` to all patterns
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:72:9
|
|
|
|
|
|
|
|
|
72 | / match v {
|
|
|
|
73 | | &Some(v) => println!("{:?}", v),
|
|
|
|
74 | | &None => println!("none"),
|
|
|
|
75 | | }
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
|
= note: `-D match-ref-pats` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
help: instead of prefixing all patterns with `&`, you can dereference the expression
|
2018-04-05 19:18:38 +00:00
|
|
|
|
|
|
|
|
72 | match *v {
|
|
|
|
73 | Some(v) => println!("{:?}", v),
|
|
|
|
74 | None => println!("none"),
|
|
|
|
|
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you don't need to add `&` to all patterns
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:82:5
|
|
|
|
|
|
|
|
|
82 | / match tup {
|
|
|
|
83 | | &(v, 1) => println!("{}", v),
|
|
|
|
84 | | _ => println!("none"),
|
|
|
|
85 | | }
|
|
|
|
| |_____^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: instead of prefixing all patterns with `&`, you can dereference the expression
|
2018-04-05 19:18:38 +00:00
|
|
|
|
|
|
|
|
82 | match *tup {
|
|
|
|
83 | (v, 1) => println!("{}", v),
|
|
|
|
|
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you don't need to add `&` to both the expression and the patterns
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:88:5
|
|
|
|
|
|
|
|
|
88 | / match &w {
|
|
|
|
89 | | &Some(v) => println!("{:?}", v),
|
|
|
|
90 | | &None => println!("none"),
|
|
|
|
91 | | }
|
|
|
|
| |_____^
|
2018-02-04 12:41:54 +00:00
|
|
|
help: try
|
2018-04-05 19:18:38 +00:00
|
|
|
|
|
|
|
|
88 | match w {
|
|
|
|
89 | Some(v) => println!("{:?}", v),
|
|
|
|
90 | None => println!("none"),
|
|
|
|
|
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you don't need to add `&` to all patterns
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:99:5
|
2017-05-11 11:45:55 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
99 | / if let &None = a {
|
|
|
|
100 | | println!("none");
|
|
|
|
101 | | }
|
2017-04-23 13:25:22 +00:00
|
|
|
| |_____^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: instead of prefixing all patterns with `&`, you can dereference the expression
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
99 | if let None = *a {
|
2017-11-10 07:58:54 +00:00
|
|
|
|
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you don't need to add `&` to both the expression and the patterns
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:104:5
|
2017-05-11 11:45:55 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
104 | / if let &None = &b {
|
|
|
|
105 | | println!("none");
|
|
|
|
106 | | }
|
2018-02-04 12:41:54 +00:00
|
|
|
| |_____^
|
|
|
|
help: try
|
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
104 | if let None = b {
|
2018-02-04 12:41:54 +00:00
|
|
|
|
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: some ranges overlap
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:113:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
113 | 0 ... 10 => println!("0 ... 10"),
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
= note: `-D match-overlapping-arm` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
note: overlaps with this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:114:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
114 | 0 ... 11 => println!("0 ... 11"),
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: some ranges overlap
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:119:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
119 | 0 ... 5 => println!("0 ... 5"),
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: overlaps with this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:121:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
121 | FOO ... 11 => println!("0 ... 11"),
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: some ranges overlap
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:127:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
127 | 0 ... 5 => println!("0 ... 5"),
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: overlaps with this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:126:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
126 | 2 => println!("2"),
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: some ranges overlap
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:133:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
133 | 0 ... 2 => println!("0 ... 2"),
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: overlaps with this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:132:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
132 | 2 => println!("2"),
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: some ranges overlap
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:156:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
156 | 0 .. 11 => println!("0 .. 11"),
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: overlaps with this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:157:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
157 | 0 ... 11 => println!("0 ... 11"),
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
2017-02-11 06:57:50 +00:00
|
|
|
error: Err(_) will match all errors, maybe not a good idea
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:174:9
|
2017-02-11 06:57:50 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
174 | Err(_) => panic!("err")
|
2017-02-11 06:57:50 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
= note: `-D match-wild-err-arm` implied by `-D warnings`
|
2017-02-11 06:57:50 +00:00
|
|
|
= note: to remove this warning, match each error seperately or use unreachable macro
|
|
|
|
|
2017-09-12 12:25:58 +00:00
|
|
|
error: this `match` has identical arm bodies
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:173:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
173 | Ok(_) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D match-same-arms` implied by `-D warnings`
|
|
|
|
note: same as this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:172:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
172 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:172:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
172 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 14:45:12 +00:00
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
2017-09-12 12:25:58 +00:00
|
|
|
|
2017-02-11 06:57:50 +00:00
|
|
|
error: Err(_) will match all errors, maybe not a good idea
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:180:9
|
2017-02-11 06:57:50 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
180 | Err(_) => {panic!()}
|
2017-02-11 06:57:50 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= note: to remove this warning, match each error seperately or use unreachable macro
|
|
|
|
|
2017-09-12 12:25:58 +00:00
|
|
|
error: this `match` has identical arm bodies
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:179:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
179 | Ok(_) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:178:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
178 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:178:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
178 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 14:45:12 +00:00
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
2017-09-12 12:25:58 +00:00
|
|
|
|
2017-02-11 13:42:42 +00:00
|
|
|
error: Err(_) will match all errors, maybe not a good idea
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:186:9
|
2017-02-11 13:42:42 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
186 | Err(_) => {panic!();}
|
2017-02-11 13:42:42 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= note: to remove this warning, match each error seperately or use unreachable macro
|
|
|
|
|
2017-09-12 12:25:58 +00:00
|
|
|
error: this `match` has identical arm bodies
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:185:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
185 | Ok(_) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:184:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
184 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:184:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
184 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 14:45:12 +00:00
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:192:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
192 | Ok(_) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:191:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
191 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:191:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
191 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 14:45:12 +00:00
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:199:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
199 | Ok(_) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:198:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
198 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:198:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
198 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 14:45:12 +00:00
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:205:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
205 | Ok(_) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:204:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
204 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:204:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
204 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 14:45:12 +00:00
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:211:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
211 | Ok(_) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:210:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
210 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:210:18
|
2017-09-12 12:25:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
210 | Ok(3) => println!("ok"),
|
2017-09-12 12:25:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 14:45:12 +00:00
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
2017-09-12 12:25:58 +00:00
|
|
|
|
2017-11-29 20:52:49 +00:00
|
|
|
error: this `match` has identical arm bodies
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:232:29
|
2017-11-29 20:52:49 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
232 | (Ok(_), Some(x)) => println!("ok {}", x),
|
2017-11-29 20:42:37 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:231:29
|
2017-11-29 20:42:37 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
231 | (Ok(x), Some(_)) => println!("ok {}", x),
|
2017-11-29 20:42:37 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `(Ok(x), Some(_)) | (Ok(_), Some(x))`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:231:29
|
2017-11-29 20:42:37 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
231 | (Ok(x), Some(_)) => println!("ok {}", x),
|
2017-11-29 20:42:37 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
|
|
|
|
2017-11-29 21:42:58 +00:00
|
|
|
error: this `match` has identical arm bodies
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:247:18
|
2017-11-29 21:42:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
247 | Ok(_) => println!("ok"),
|
2017-11-29 21:42:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:246:18
|
2017-11-29 21:42:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
246 | Ok(3) => println!("ok"),
|
2017-11-29 21:42:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:246:18
|
2017-11-29 21:42:58 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
246 | Ok(3) => println!("ok"),
|
2017-11-29 21:42:58 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
|
|
|
|
2017-12-19 22:22:16 +00:00
|
|
|
error: use as_ref() instead
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:254:33
|
2017-12-19 22:22:16 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
254 | let borrowed: Option<&()> = match owned {
|
2017-12-20 09:39:48 +00:00
|
|
|
| _________________________________^
|
2018-04-05 19:18:38 +00:00
|
|
|
255 | | None => None,
|
|
|
|
256 | | Some(ref v) => Some(v),
|
|
|
|
257 | | };
|
2017-12-19 22:22:16 +00:00
|
|
|
| |_____^ help: try this: `owned.as_ref()`
|
|
|
|
|
|
|
|
|
= note: `-D match-as-ref` implied by `-D warnings`
|
|
|
|
|
2017-12-20 09:39:48 +00:00
|
|
|
error: use as_mut() instead
|
2018-04-05 19:18:38 +00:00
|
|
|
--> $DIR/matches.rs:260:39
|
2017-12-19 22:22:16 +00:00
|
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
260 | let borrow_mut: Option<&mut ()> = match mut_owned {
|
2017-12-20 09:39:48 +00:00
|
|
|
| _______________________________________^
|
2018-04-05 19:18:38 +00:00
|
|
|
261 | | None => None,
|
|
|
|
262 | | Some(ref mut v) => Some(v),
|
|
|
|
263 | | };
|
2017-12-20 09:39:48 +00:00
|
|
|
| |_____^ help: try this: `mut_owned.as_mut()`
|
2017-12-19 22:22:16 +00:00
|
|
|
|
2018-04-05 19:18:38 +00:00
|
|
|
error: aborting due to 33 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|