diff options
| author | rail <12975677+rail-rain@users.noreply.github.com> | 2021-04-10 17:50:54 +1200 |
|---|---|---|
| committer | rail <12975677+rail-rain@users.noreply.github.com> | 2021-04-12 15:32:54 +1200 |
| commit | fb54b703c7e6cfda05991fbe7e6f292fc82c4a27 (patch) | |
| tree | df177a8268f76b1d7077055c9bfd72802cf2ba02 | |
| parent | a15d987c8f9c0c9e911f112d21d55e36da3df370 (diff) | |
| download | rust-fb54b703c7e6cfda05991fbe7e6f292fc82c4a27.tar.gz rust-fb54b703c7e6cfda05991fbe7e6f292fc82c4a27.zip | |
Add a note on the issue #5953
| -rw-r--r-- | clippy_lints/src/pass_by_ref_or_value.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clippy_lints/src/pass_by_ref_or_value.rs b/clippy_lints/src/pass_by_ref_or_value.rs index 9a5b1c3b944..48b1d2b94a1 100644 --- a/clippy_lints/src/pass_by_ref_or_value.rs +++ b/clippy_lints/src/pass_by_ref_or_value.rs @@ -41,6 +41,14 @@ declare_clippy_lint! { /// false positives in cases involving multiple lifetimes that are bounded by /// each other. /// + /// Also, it does not take account of other similar cases where getting memory addresses + /// matters; namely, returning the pointer to the argument in question, + /// and passing the argument, as both references and pointers, + /// to a function that needs the memory address. For further details, refer to + /// [this issue](https://github.com/rust-lang/rust-clippy/issues/5953) + /// that explains a real case in which this false positive + /// led to an **undefined behaviour** introduced with unsafe code. + /// /// **Example:** /// /// ```rust |
