Put is_from_proc_macro
last
This commit is contained in:
parent
e9a222beb5
commit
f3c5877302
1 changed files with 1 additions and 1 deletions
|
@ -112,8 +112,8 @@ impl<'tcx> LateLintPass<'tcx> for ReserveAfterInitialization {
|
||||||
if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind
|
if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind
|
||||||
&& let ExprKind::MethodCall(name, self_arg, [space_hint], _) = expr.kind
|
&& let ExprKind::MethodCall(name, self_arg, [space_hint], _) = expr.kind
|
||||||
&& path_to_local_id(self_arg, searcher.local_id)
|
&& path_to_local_id(self_arg, searcher.local_id)
|
||||||
&& !is_from_proc_macro(cx, expr)
|
|
||||||
&& name.ident.as_str() == "reserve"
|
&& name.ident.as_str() == "reserve"
|
||||||
|
&& !is_from_proc_macro(cx, expr)
|
||||||
{
|
{
|
||||||
self.searcher = Some(VecReserveSearcher {
|
self.searcher = Some(VecReserveSearcher {
|
||||||
err_span: searcher.err_span.to(stmt.span),
|
err_span: searcher.err_span.to(stmt.span),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue