cannot_move_from_type_with_drop();
borrower_propagation();
not_consumed();
+ issue_5405();
}
#[derive(Clone)]
println!("{}", x);
}
}
+
+#[allow(clippy::clone_on_copy)]
+fn issue_5405() {
+ let a: [String; 1] = [String::from("foo")];
+ let _b: String = a[0].clone();
+
+ let c: [usize; 2] = [2, 3];
+ let _d: usize = c[1].clone();
+}