2017-02-07 14:05:30 -06:00
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:26:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-04-23 08:25:22 -05:00
|
|
|
26 | / match ExprNode::Butterflies {
|
2017-05-11 06:45:55 -05:00
|
|
|
27 | | ExprNode::ExprAddrOf => Some(&NODE),
|
|
|
|
28 | | _ => { let x = 5; None },
|
|
|
|
29 | | }
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: try this: `if let ExprNode::ExprAddrOf = ExprNode::Butterflies { Some(&NODE) } else { let x = 5; None }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
= note: `-D single-match-else` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:35:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
35 | / match x {
|
|
|
|
36 | | Some(y) => { println!("{:?}", y); }
|
|
|
|
37 | | _ => ()
|
|
|
|
38 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: try this: `if let Some(y) = x { println!("{:?}", y); }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
= note: `-D single-match` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:41:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
41 | / match z {
|
|
|
|
42 | | (2...3, 7...9) => dummy(),
|
|
|
|
43 | | _ => {}
|
|
|
|
44 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: try this: `if let (2...3, 7...9) = z { dummy() }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:63:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
63 | / match x {
|
|
|
|
64 | | Some(y) => dummy(),
|
|
|
|
65 | | None => ()
|
|
|
|
66 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: try this: `if let Some(y) = x { dummy() }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:68:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
68 | / match y {
|
|
|
|
69 | | Ok(y) => dummy(),
|
|
|
|
70 | | Err(..) => ()
|
|
|
|
71 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: try this: `if let Ok(y) = y { dummy() }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:75:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
75 | / match c {
|
|
|
|
76 | | Cow::Borrowed(..) => dummy(),
|
|
|
|
77 | | Cow::Owned(..) => (),
|
|
|
|
78 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: try this: `if let Cow::Borrowed(..) = c { dummy() }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:96:5
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
96 | / match test {
|
|
|
|
97 | | true => 0,
|
|
|
|
98 | | false => 42,
|
|
|
|
99 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: consider using an if/else expression: `if test { 0 } else { 42 }`
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
= note: `-D match-bool` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:102:5
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
102 | / match option == 1 {
|
|
|
|
103 | | true => 1,
|
|
|
|
104 | | false => 0,
|
|
|
|
105 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: consider using an if/else expression: `if option == 1 { 1 } else { 0 }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:107:5
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
107 | / match test {
|
|
|
|
108 | | true => (),
|
|
|
|
109 | | false => { println!("Noooo!"); }
|
|
|
|
110 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:112:5
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
112 | / match test {
|
|
|
|
113 | | false => { println!("Noooo!"); }
|
|
|
|
114 | | _ => (),
|
|
|
|
115 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:117:5
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
117 | / match test && test {
|
|
|
|
118 | | false => { println!("Noooo!"); }
|
|
|
|
119 | | _ => (),
|
|
|
|
120 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: consider using an if/else expression: `if !(test && test) { println!("Noooo!"); }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:117:11
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
117 | match test && test {
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
= note: `-D eq-op` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:122:5
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
122 | / match test {
|
|
|
|
123 | | false => { println!("Noooo!"); }
|
|
|
|
124 | | true => { println!("Yes!"); }
|
|
|
|
125 | | };
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: consider using an if/else expression: `if test { println!("Yes!"); } else { println!("Noooo!"); }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you don't need to add `&` to all patterns
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:138:9
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
138 | / match v {
|
|
|
|
139 | | &Some(v) => println!("{:?}", v),
|
|
|
|
140 | | &None => println!("none"),
|
|
|
|
141 | | }
|
2017-04-23 08:25:22 -05:00
|
|
|
| |_________^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
= note: `-D match-ref-pats` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
help: instead of prefixing all patterns with `&`, you can dereference the expression
|
2017-07-10 08:29:29 -05:00
|
|
|
|
|
|
|
|
138 | match *v { .. }
|
2017-11-10 01:58:54 -06:00
|
|
|
|
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you don't need to add `&` to all patterns
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:148:5
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
148 | / match tup {
|
|
|
|
149 | | &(v, 1) => println!("{}", v),
|
|
|
|
150 | | _ => println!("none"),
|
|
|
|
151 | | }
|
2017-04-23 08:25:22 -05:00
|
|
|
| |_____^
|
2017-02-07 14:05:30 -06:00
|
|
|
help: instead of prefixing all patterns with `&`, you can dereference the expression
|
2017-07-10 08:29:29 -05:00
|
|
|
|
|
|
|
|
148 | match *tup { .. }
|
2017-11-10 01:58:54 -06:00
|
|
|
|
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you don't need to add `&` to both the expression and the patterns
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:154:5
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
154 | / match &w {
|
|
|
|
155 | | &Some(v) => println!("{:?}", v),
|
|
|
|
156 | | &None => println!("none"),
|
|
|
|
157 | | }
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: try: `match w { .. }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you don't need to add `&` to all patterns
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:165:5
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
165 | / if let &None = a {
|
|
|
|
166 | | println!("none");
|
|
|
|
167 | | }
|
2017-04-23 08:25:22 -05:00
|
|
|
| |_____^
|
2017-02-07 14:05:30 -06:00
|
|
|
help: instead of prefixing all patterns with `&`, you can dereference the expression
|
2017-07-10 08:29:29 -05:00
|
|
|
|
|
|
|
|
165 | if let .. = *a { .. }
|
2017-11-10 01:58:54 -06:00
|
|
|
|
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: you don't need to add `&` to both the expression and the patterns
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:170:5
|
2017-05-11 06:45:55 -05:00
|
|
|
|
|
|
|
|
170 | / if let &None = &b {
|
|
|
|
171 | | println!("none");
|
|
|
|
172 | | }
|
2017-07-21 03:40:23 -05:00
|
|
|
| |_____^ help: try: `if let .. = b { .. }`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: some ranges overlap
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:179:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
179 | 0 ... 10 => println!("0 ... 10"),
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
= note: `-D match-overlapping-arm` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
note: overlaps with this
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:180:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
180 | 0 ... 11 => println!("0 ... 11"),
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: some ranges overlap
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:185:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
185 | 0 ... 5 => println!("0 ... 5"),
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: overlaps with this
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:187:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
187 | FOO ... 11 => println!("0 ... 11"),
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: some ranges overlap
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:193:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
193 | 0 ... 5 => println!("0 ... 5"),
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: overlaps with this
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:192:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
192 | 2 => println!("2"),
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: some ranges overlap
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:199:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
199 | 0 ... 2 => println!("0 ... 2"),
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: overlaps with this
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:198:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
198 | 2 => println!("2"),
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: some ranges overlap
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:222:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
222 | 0 .. 11 => println!("0 .. 11"),
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: overlaps with this
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:223:9
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
223 | 0 ... 11 => println!("0 ... 11"),
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
2017-02-11 00:57:50 -06:00
|
|
|
error: Err(_) will match all errors, maybe not a good idea
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:240:9
|
2017-02-11 00:57:50 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
240 | Err(_) => panic!("err")
|
2017-02-11 00:57:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
= note: `-D match-wild-err-arm` implied by `-D warnings`
|
2017-02-11 00:57:50 -06:00
|
|
|
= note: to remove this warning, match each error seperately or use unreachable macro
|
|
|
|
|
2017-09-12 07:25:58 -05:00
|
|
|
error: this `match` has identical arm bodies
|
|
|
|
--> $DIR/matches.rs:239:18
|
|
|
|
|
|
|
|
|
239 | Ok(_) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D match-same-arms` implied by `-D warnings`
|
|
|
|
note: same as this
|
|
|
|
--> $DIR/matches.rs:238:18
|
|
|
|
|
|
|
|
|
238 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
|
|
|
--> $DIR/matches.rs:238:18
|
|
|
|
|
|
|
|
|
238 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 08:45:12 -06: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 07:25:58 -05:00
|
|
|
|
2017-02-11 00:57:50 -06:00
|
|
|
error: Err(_) will match all errors, maybe not a good idea
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:246:9
|
2017-02-11 00:57:50 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
246 | Err(_) => {panic!()}
|
2017-02-11 00:57:50 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= note: to remove this warning, match each error seperately or use unreachable macro
|
|
|
|
|
2017-09-12 07:25:58 -05:00
|
|
|
error: this `match` has identical arm bodies
|
|
|
|
--> $DIR/matches.rs:245:18
|
|
|
|
|
|
|
|
|
245 | Ok(_) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
|
|
|
--> $DIR/matches.rs:244:18
|
|
|
|
|
|
|
|
|
244 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
|
|
|
--> $DIR/matches.rs:244:18
|
|
|
|
|
|
|
|
|
244 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 08:45:12 -06: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 07:25:58 -05:00
|
|
|
|
2017-02-11 07:42:42 -06:00
|
|
|
error: Err(_) will match all errors, maybe not a good idea
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/matches.rs:252:9
|
2017-02-11 07:42:42 -06:00
|
|
|
|
|
2017-05-11 06:45:55 -05:00
|
|
|
252 | Err(_) => {panic!();}
|
2017-02-11 07:42:42 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= note: to remove this warning, match each error seperately or use unreachable macro
|
|
|
|
|
2017-09-12 07:25:58 -05:00
|
|
|
error: this `match` has identical arm bodies
|
|
|
|
--> $DIR/matches.rs:251:18
|
|
|
|
|
|
|
|
|
251 | Ok(_) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
|
|
|
--> $DIR/matches.rs:250:18
|
|
|
|
|
|
|
|
|
250 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
|
|
|
--> $DIR/matches.rs:250:18
|
|
|
|
|
|
|
|
|
250 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 08:45:12 -06: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 07:25:58 -05:00
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
|
|
|
--> $DIR/matches.rs:258:18
|
|
|
|
|
|
|
|
|
258 | Ok(_) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
|
|
|
--> $DIR/matches.rs:257:18
|
|
|
|
|
|
|
|
|
257 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
|
|
|
--> $DIR/matches.rs:257:18
|
|
|
|
|
|
|
|
|
257 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 08:45:12 -06: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 07:25:58 -05:00
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
|
|
|
--> $DIR/matches.rs:265:18
|
|
|
|
|
|
|
|
|
265 | Ok(_) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
|
|
|
--> $DIR/matches.rs:264:18
|
|
|
|
|
|
|
|
|
264 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
|
|
|
--> $DIR/matches.rs:264:18
|
|
|
|
|
|
|
|
|
264 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 08:45:12 -06: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 07:25:58 -05:00
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
|
|
|
--> $DIR/matches.rs:271:18
|
|
|
|
|
|
|
|
|
271 | Ok(_) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
|
|
|
--> $DIR/matches.rs:270:18
|
|
|
|
|
|
|
|
|
270 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
|
|
|
--> $DIR/matches.rs:270:18
|
|
|
|
|
|
|
|
|
270 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 08:45:12 -06: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 07:25:58 -05:00
|
|
|
|
|
|
|
error: this `match` has identical arm bodies
|
|
|
|
--> $DIR/matches.rs:277:18
|
|
|
|
|
|
|
|
|
277 | Ok(_) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
|
|
|
--> $DIR/matches.rs:276:18
|
|
|
|
|
|
|
|
|
276 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
|
|
|
--> $DIR/matches.rs:276:18
|
|
|
|
|
|
|
|
|
276 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
2017-11-29 08:45:12 -06: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 07:25:58 -05:00
|
|
|
|
2017-11-29 14:52:49 -06:00
|
|
|
error: this `match` has identical arm bodies
|
|
|
|
--> $DIR/matches.rs:298:29
|
|
|
|
|
|
|
|
|
298 | (Ok(_), Some(x)) => println!("ok {}", x),
|
2017-11-29 14:42:37 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
2017-11-29 14:52:49 -06:00
|
|
|
--> $DIR/matches.rs:297:29
|
2017-11-29 14:42:37 -06:00
|
|
|
|
|
2017-11-29 14:52:49 -06:00
|
|
|
297 | (Ok(x), Some(_)) => println!("ok {}", x),
|
2017-11-29 14:42:37 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `(Ok(x), Some(_)) | (Ok(_), Some(x))`
|
2017-11-29 14:52:49 -06:00
|
|
|
--> $DIR/matches.rs:297:29
|
2017-11-29 14:42:37 -06:00
|
|
|
|
|
2017-11-29 14:52:49 -06:00
|
|
|
297 | (Ok(x), Some(_)) => println!("ok {}", x),
|
2017-11-29 14:42:37 -06: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 15:42:58 -06:00
|
|
|
error: this `match` has identical arm bodies
|
|
|
|
--> $DIR/matches.rs:313:18
|
|
|
|
|
|
|
|
|
313 | Ok(_) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: same as this
|
|
|
|
--> $DIR/matches.rs:312:18
|
|
|
|
|
|
|
|
|
312 | Ok(3) => println!("ok"),
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: consider refactoring into `Ok(3) | Ok(_)`
|
|
|
|
--> $DIR/matches.rs:312:18
|
|
|
|
|
|
|
|
|
312 | 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)
|
|
|
|
|
2017-12-19 16:22:16 -06:00
|
|
|
error: use as_ref() instead
|
2017-12-20 03:39:48 -06:00
|
|
|
--> $DIR/matches.rs:320:33
|
2017-12-19 16:22:16 -06:00
|
|
|
|
|
2017-12-20 03:39:48 -06:00
|
|
|
320 | let borrowed: Option<&()> = match owned {
|
|
|
|
| _________________________________^
|
2017-12-19 16:22:16 -06:00
|
|
|
321 | | None => None,
|
|
|
|
322 | | Some(ref v) => Some(v),
|
|
|
|
323 | | };
|
|
|
|
| |_____^ help: try this: `owned.as_ref()`
|
|
|
|
|
|
|
|
|
= note: `-D match-as-ref` implied by `-D warnings`
|
|
|
|
|
2017-12-20 03:39:48 -06:00
|
|
|
error: use as_mut() instead
|
|
|
|
--> $DIR/matches.rs:326:39
|
2017-12-19 16:22:16 -06:00
|
|
|
|
|
2017-12-20 03:39:48 -06:00
|
|
|
326 | let borrow_mut: Option<&mut ()> = match mut_owned {
|
|
|
|
| _______________________________________^
|
2017-12-19 16:22:16 -06:00
|
|
|
327 | | None => None,
|
|
|
|
328 | | Some(ref mut v) => Some(v),
|
|
|
|
329 | | };
|
2017-12-20 03:39:48 -06:00
|
|
|
| |_____^ help: try this: `mut_owned.as_mut()`
|
2017-12-19 16:22:16 -06:00
|
|
|
|