mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-11 07:34:18 +00:00
15 lines
285 B
Rust
15 lines
285 B
Rust
|
// run-rustfix
|
||
|
|
||
|
#![allow(unused)]
|
||
|
#![warn(clippy::match_as_ref)]
|
||
|
|
||
|
fn match_as_ref() {
|
||
|
let owned: Option<()> = None;
|
||
|
let borrowed: Option<&()> = owned.as_ref();
|
||
|
|
||
|
let mut mut_owned: Option<()> = None;
|
||
|
let borrow_mut: Option<&mut ()> = mut_owned.as_mut();
|
||
|
}
|
||
|
|
||
|
fn main() {}
|