diff options
| author | bors <bors@rust-lang.org> | 2022-10-21 20:19:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-21 20:19:30 +0000 |
| commit | b72e451310d65ddf69441a641e2ebd6886c813b8 (patch) | |
| tree | 0ed219e19c2bb0e08f8de2f903d1c91202993c86 /tests | |
| parent | b2e5a719bbe4e337757b6d39363df2c801da4a60 (diff) | |
| parent | 615b7617ed3ba1ea44575a9072b17a4bdfb565b2 (diff) | |
| download | rust-b72e451310d65ddf69441a641e2ebd6886c813b8.tar.gz rust-b72e451310d65ddf69441a641e2ebd6886c813b8.zip | |
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
`ref_option_ref` do not lint when inner reference is mutable changelog: FP: [`ref_option_ref`]: No longer lints if the inner reference is mutable fix https://github.com/rust-lang/rust-clippy/issues/9682
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/ref_option_ref.rs | 5 |
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:?}"); +} |
