Add doc for the clippy_lints::methods::derefs_to_slice() helper
This commit is contained in:
parent
f74d7ce813
commit
f5122ae4fd
1 changed files with 3 additions and 0 deletions
|
|
@ -8,6 +8,9 @@ use rustc_middle::ty::{self, Ty};
|
|||
use rustc_span::Span;
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
/// Checks if `expr`, of type `ty`, corresponds to a slice or can be dereferenced to a slice, or if
|
||||
/// `expr` is a method call to `.iter()` on such a type. In these cases, return the slice-like
|
||||
/// expression.
|
||||
pub(super) fn derefs_to_slice<'tcx>(
|
||||
cx: &LateContext<'tcx>,
|
||||
expr: &'tcx Expr<'tcx>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue