X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftools%2Fclippy%2Ftests%2Fui%2Fmatch_as_ref.fixed;h=ddfa1e741ada439e347229fe090e7ad508a9dffe;hb=cce9e72c55994335f8d1dac892cca755b65c8f43;hp=c61eb9216643e14159ca5d6fb26b93764b05e264;hpb=fdee059c9050d8135dc98db8c90b225c9e6b085a;p=rust.git diff --git a/src/tools/clippy/tests/ui/match_as_ref.fixed b/src/tools/clippy/tests/ui/match_as_ref.fixed index c61eb921664..ddfa1e741ad 100644 --- a/src/tools/clippy/tests/ui/match_as_ref.fixed +++ b/src/tools/clippy/tests/ui/match_as_ref.fixed @@ -32,4 +32,12 @@ mod issue4437 { } } -fn main() {} +fn main() { + // Don't lint + let _ = match Some(0) { + #[cfg(feature = "foo")] + Some(ref x) if *x > 50 => None, + Some(ref x) => Some(x), + None => None, + }; +}