mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Add Known Problem for multiple lifetimes
This commit is contained in:
parent
58459abd0c
commit
89a4558056
1 changed files with 6 additions and 0 deletions
|
@ -31,6 +31,12 @@ use crate::utils::{in_macro, is_copy, is_self, span_lint_and_sugg, snippet};
|
||||||
/// The configuration option `trivial_copy_size_limit` can be set to override
|
/// The configuration option `trivial_copy_size_limit` can be set to override
|
||||||
/// this limit for a project.
|
/// this limit for a project.
|
||||||
///
|
///
|
||||||
|
/// This lint attempts to allow passing arguments by reference if a reference
|
||||||
|
/// to that argument is returned. This is implemented by comparing the lifetime
|
||||||
|
/// of the argument and return value for equality. However, this can cause
|
||||||
|
/// false positives in cases involving multiple lifetimes that are bounded by
|
||||||
|
/// each other.
|
||||||
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// fn foo(v: &u32) {
|
/// fn foo(v: &u32) {
|
||||||
|
|
Loading…
Reference in a new issue