]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_as_ref.fixed
Auto merge of #4314 - chansuke:add-negation-to-is_empty, r=flip1995
[rust.git] / tests / ui / match_as_ref.fixed
1 // run-rustfix
2
3 #![allow(unused)]
4 #![warn(clippy::match_as_ref)]
5
6 fn match_as_ref() {
7     let owned: Option<()> = None;
8     let borrowed: Option<&()> = owned.as_ref();
9
10     let mut mut_owned: Option<()> = None;
11     let borrow_mut: Option<&mut ()> = mut_owned.as_mut();
12 }
13
14 fn main() {}