|
| 1 | + Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s |
| 2 | + Running `target/debug/clippy_dev lint /Users/barun511/open_source/clippy-examples/src/main.rs` |
| 3 | + Compiling clippy_lints v0.1.89 (/Users/barun511/open_source/rust-clippy/clippy_lints) |
| 4 | +error[E0423]: expected function, tuple struct or tuple variant, found enum `Option` |
| 5 | + --> clippy_lints/src/ifs_as_logical_ops.rs:41:17 |
| 6 | + | |
| 7 | +41 | Option(cond.span), |
| 8 | + | ^^^^^^ |
| 9 | + | |
| 10 | + = help: you might have meant to construct the enum's non-tuple variant |
| 11 | +note: these items exist but are inaccessible |
| 12 | + --> clippy_lints/src/len_zero.rs:321:5 |
| 13 | + | |
| 14 | +321 | Option(DefId), |
| 15 | + | ^^^^^^^^^^^^^ `crate::len_zero::LenOutput::Option`: not accessible |
| 16 | + | |
| 17 | + ::: clippy_lints/src/question_mark.rs:320:5 |
| 18 | + | |
| 19 | +320 | Option, |
| 20 | + | ^^^^^^ `crate::question_mark::TryMode::Option`: not accessible |
| 21 | + | |
| 22 | + ::: clippy_lints/src/unwrap.rs:84:5 |
| 23 | + | |
| 24 | +84 | Option, |
| 25 | + | ^^^^^^ `crate::unwrap::UnwrappableKind::Option`: not accessible |
| 26 | +help: try to construct one of the enum's variants |
| 27 | + | |
| 28 | +41 - Option(cond.span), |
| 29 | +41 + std::option::Option::Some(cond.span), |
| 30 | + | |
| 31 | +help: consider importing one of these items instead |
| 32 | + | |
| 33 | +1 + use clippy_utils::sym::Option; |
| 34 | + | |
| 35 | +1 + use rustc_hir::LangItem::Option; |
| 36 | + | |
| 37 | +1 + use rustc_middle::ty::lang_items::TraitSolverLangItem::Option; |
| 38 | + | |
| 39 | +1 + use rustc_span::sym::Option; |
| 40 | + | |
| 41 | + and 1 other candidate |
| 42 | + |
| 43 | +warning: unnecessary qualification |
| 44 | + --> clippy_lints/src/ifs_as_logical_ops.rs:27:57 |
| 45 | + | |
| 46 | +27 | fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &rustc_ast::Expr) { |
| 47 | + | ^^^^^^^^^^^^^^^ |
| 48 | + | |
| 49 | +note: the lint level is defined here |
| 50 | + --> clippy_lints/src/lib.rs:27:5 |
| 51 | + | |
| 52 | +27 | unused_qualifications, |
| 53 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 54 | +help: remove the unnecessary path segments |
| 55 | + | |
| 56 | +27 - fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &rustc_ast::Expr) { |
| 57 | +27 + fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &Expr) { |
| 58 | + | |
| 59 | + |
| 60 | +error[E0308]: mismatched types |
| 61 | + --> clippy_lints/src/ifs_as_logical_ops.rs:31:20 |
| 62 | + | |
| 63 | +31 | && let StmtKind::Expr(els_expr) = stmt |
| 64 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `&rustc_ast::Stmt` |
| 65 | + | | |
| 66 | + | expected `Stmt`, found `StmtKind` |
| 67 | + |
| 68 | +error[E0308]: mismatched types |
| 69 | + --> clippy_lints/src/ifs_as_logical_ops.rs:32:20 |
| 70 | + | |
| 71 | +32 | && let ExprKind::Lit(lit) = els_expr |
| 72 | + | ^^^^^^^^^^^^^^^^^^ -------- this expression has type `&P<rustc_ast::Expr>` |
| 73 | + | | |
| 74 | + | expected `P<Expr>`, found `ExprKind` |
| 75 | + | |
| 76 | + = note: expected struct `P<rustc_ast::Expr>` |
| 77 | + found enum `rustc_ast::ExprKind` |
| 78 | + |
| 79 | +error[E0308]: mismatched types |
| 80 | + --> clippy_lints/src/ifs_as_logical_ops.rs:33:20 |
| 81 | + | |
| 82 | +33 | && let LitKind::Bool(value) = lit |
| 83 | + | ^^^^^^^^^^^^^^^^^^^^ --- this expression has type `&rustc_ast::token::Lit` |
| 84 | + | | |
| 85 | + | expected `Lit`, found `LitKind` |
| 86 | + |
| 87 | +error[E0277]: can't compare `&bool` with `bool` |
| 88 | + --> clippy_lints/src/ifs_as_logical_ops.rs:34:22 |
| 89 | + | |
| 90 | +34 | && value == false |
| 91 | + | ^^ no implementation for `&bool == bool` |
| 92 | + | |
| 93 | + = help: the trait `std::cmp::PartialEq<bool>` is not implemented for `&bool` |
| 94 | +help: consider dereferencing here |
| 95 | + | |
| 96 | +34 | && *value == false |
| 97 | + | + |
| 98 | + |
| 99 | +Some errors have detailed explanations: E0277, E0308, E0423. |
| 100 | +For more information about an error, try `rustc --explain E0277`. |
| 101 | +warning: `clippy_lints` (lib) generated 1 warning |
| 102 | +error: could not compile `clippy_lints` (lib) due to 5 previous errors; 1 warning emitted |
0 commit comments