Skip to content

Commit

Permalink
Add a note on the issue rust-lang#5953
Browse files Browse the repository at this point in the history
  • Loading branch information
rail-rain committed Apr 12, 2021
1 parent a15d987 commit fb54b70
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clippy_lints/src/pass_by_ref_or_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb54b70

Please sign in to comment.