Skip to content

Commit

Permalink
Update clippy_lints/src/needless_option_as_deref.rs
Browse files Browse the repository at this point in the history
Co-authored-by: llogiq <bogusandre@gmail.com>
  • Loading branch information
lengyijun and llogiq committed Sep 5, 2021
1 parent 4184cc3 commit 37af742
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions clippy_lints/src/needless_option_as_deref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ declare_lint_pass!(OptionNeedlessDeref=> [

impl<'tcx> LateLintPass<'tcx> for OptionNeedlessDeref {
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
if expr.span.from_expansion() {
return;
}
if in_macro(expr.span) {
if expr.span.from_expansion() || in_macro(expr.span) {
return;
}
let typeck = cx.typeck_results();
Expand Down

0 comments on commit 37af742

Please sign in to comment.