Skip to content

Commit 38ed056

Browse files
committed
Add a note on the issue rust-lang#5953
1 parent a15d987 commit 38ed056

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clippy_lints/src/pass_by_ref_or_value.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ declare_clippy_lint! {
4141
/// false positives in cases involving multiple lifetimes that are bounded by
4242
/// each other.
4343
///
44+
/// Also, it does not take account of other similar cases where getting memory addresses
45+
/// is important; namely, returning the pointer to the argument in question,
46+
/// and passing the argument to a function that performs some dark magic
47+
/// as both references and pointers. For further details, refer to
48+
/// [this issue](https://github.com/rust-lang/rust-clippy/issues/5953)
49+
/// that explains a real case in which this false positive
50+
/// led to an undefined behaviour introduced and more.
51+
///
4452
/// **Example:**
4553
///
4654
/// ```rust

0 commit comments

Comments
 (0)