Add Known Problem for multiple lifetimes

This commit is contained in:
Ryan Cumming 2018-07-23 19:33:52 +10:00
parent 58459abd0c
commit 89a4558056

View file

@ -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) {