@@ -256,30 +256,8 @@ LL | Ok(3) => println!("ok"),
256256 | ^^^^^^^^^^^^^^
257257 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
258258
259- error: use as_ref() instead
260- --> $DIR/matches.rs:141:33
261- |
262- LL | let borrowed: Option<&()> = match owned {
263- | _________________________________^
264- LL | | None => None,
265- LL | | Some(ref v) => Some(v),
266- LL | | };
267- | |_____^ help: try this: `owned.as_ref()`
268- |
269- = note: `-D clippy::match-as-ref` implied by `-D warnings`
270-
271- error: use as_mut() instead
272- --> $DIR/matches.rs:147:39
273- |
274- LL | let borrow_mut: Option<&mut ()> = match mut_owned {
275- | _______________________________________^
276- LL | | None => None,
277- LL | | Some(ref mut v) => Some(v),
278- LL | | };
279- | |_____^ help: try this: `mut_owned.as_mut()`
280-
281259error: you don't need to add `&` to all patterns
282- --> $DIR/matches.rs:174 :5
260+ --> $DIR/matches.rs:160 :5
283261 |
284262LL | / match foo_variant!(0) {
285263LL | | &Foo::A => println!("A"),
@@ -292,5 +270,5 @@ LL | match *foo_variant!(0) {
292270LL | Foo::A => println!("A"),
293271 |
294272
295- error: aborting due to 20 previous errors
273+ error: aborting due to 18 previous errors
296274
0 commit comments