]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/min_rust_version_attr.rs
Auto merge of #84620 - Dylan-DPC:rollup-wkv97im, r=Dylan-DPC
[rust.git] / src / tools / clippy / tests / ui / min_rust_version_attr.rs
index 0f47f1cbc4026cb77c88eb4e70612e83ba70a60c..7f9f7ddc53575ca57a21cc0840df551218571da1 100644 (file)
@@ -4,6 +4,10 @@
 
 use std::ops::{Deref, RangeFrom};
 
+fn cloned_instead_of_copied() {
+    let _ = [1].iter().cloned();
+}
+
 fn option_as_ref_deref() {
     let mut opt = Some(String::from("123"));
 
@@ -123,6 +127,11 @@ fn missing_const_for_fn() -> i32 {
     1
 }
 
+fn unnest_or_patterns() {
+    struct TS(u8, u8);
+    if let TS(0, x) | TS(1, x) = TS(0, 0) {}
+}
+
 fn main() {
     filter_map_next();
     checked_conversion();
@@ -138,6 +147,7 @@ fn main() {
     replace_with_default();
     map_unwrap_or();
     missing_const_for_fn();
+    unnest_or_patterns();
 }
 
 mod meets_msrv {