about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorkraktus <kraktus@users.noreply.github.com>2022-10-21 13:48:41 +0200
committerkraktus <kraktus@users.noreply.github.com>2022-10-21 13:48:41 +0200
commit615b7617ed3ba1ea44575a9072b17a4bdfb565b2 (patch)
treeaea9e26b45f5613c7a5afa30c2e56928d0ca7cb8 /tests
parent967f172e256802f9bf0ad5718d9c761da18132a9 (diff)
downloadrust-615b7617ed3ba1ea44575a9072b17a4bdfb565b2.tar.gz
rust-615b7617ed3ba1ea44575a9072b17a4bdfb565b2.zip
`ref_option_ref` do not lint when inner reference is mutable
As it makes the `Option` Non Copy
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/ref_option_ref.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/ref_option_ref.rs b/tests/ui/ref_option_ref.rs
index 2df45c927d7..e487799e152 100644
--- a/tests/ui/ref_option_ref.rs
+++ b/tests/ui/ref_option_ref.rs
@@ -45,3 +45,8 @@ impl RefOptTrait for u32 {
 fn main() {
     let x: &Option<&u32> = &None;
 }
+
+fn issue9682(arg: &Option<&mut String>) {
+    // Should not lint, as the inner ref is mutable making it non `Copy`
+    println!("{arg:?}");
+}