mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
Auto merge of #7065 - rail-rain:warn_copy_pass_by_ref, r=Manishearth
Add a note on the issue #5953 Hello, I thought it would be better to have a note and warning about this issue considering it introduced an UB in the past even with the "Search on Github" feature. --- changelog: Add a note on the issue #5953 to the known problems section.
This commit is contained in:
commit
f0ceb28ba1
@ -42,6 +42,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
|
||||
|
Loading…
Reference in New Issue
Block a user