]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/ptr_arg.rs
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[rust.git] / src / tools / clippy / tests / ui / ptr_arg.rs
index 97990fedd51f3e851b065f396233205e3bb75da9..03dd938a2339e57cda8eca5088c8b06a3c5d03ab 100644 (file)
@@ -194,3 +194,10 @@ fn two_vecs(a: &mut Vec<u32>, b: &mut Vec<u32>) {
     a.push(0);
     b.push(1);
 }
+
+// Issue #8495
+fn cow_conditional_to_mut(a: &mut Cow<str>) {
+    if a.is_empty() {
+        a.to_mut().push_str("foo");
+    }
+}