]> git.lizzy.rs Git - rust.git/commitdiff
Indicate anonymous lifetimes for types
authorKrishna Veera Reddy <veerareddy@email.arizona.edu>
Sun, 29 Dec 2019 05:52:08 +0000 (21:52 -0800)
committerKrishna Veera Reddy <veerareddy@email.arizona.edu>
Tue, 31 Dec 2019 17:22:35 +0000 (09:22 -0800)
README.md
clippy_lints/src/mem_replace.rs
src/lintlist/mod.rs

index 01fc20f0f27d91f96846ececdeb64ab31df7616a..215ad6f5630125cf23447dd77ff705b5a388db74 100644 (file)
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
 
 A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code.
 
-[There are 342 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
+[There are 343 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
 
 We have a bunch of lint categories to allow you to choose how much Clippy is supposed to ~~annoy~~ help you:
 
index 17a088e09a082e95c45d4e331eb900e75cc90926..5a1e3b73ded7ecfc078811d45b3839068a2dd213 100644 (file)
@@ -96,7 +96,7 @@
 declare_lint_pass!(MemReplace =>
     [MEM_REPLACE_OPTION_WITH_NONE, MEM_REPLACE_WITH_UNINIT, MEM_REPLACE_WITH_DEFAULT]);
 
-fn check_replace_option_with_none(cx: &LateContext<'_, '_>, src: &Expr, dest: &Expr, expr_span: Span) {
+fn check_replace_option_with_none(cx: &LateContext<'_, '_>, src: &Expr<'_>, dest: &Expr<'_>, expr_span: Span) {
     if let ExprKind::Path(ref replacement_qpath) = src.kind {
         // Check that second argument is `Option::None`
         if match_qpath(replacement_qpath, &paths::OPTION_NONE) {
@@ -134,7 +134,7 @@ fn check_replace_option_with_none(cx: &LateContext<'_, '_>, src: &Expr, dest: &E
     }
 }
 
-fn check_replace_with_uninit(cx: &LateContext<'_, '_>, src: &Expr, expr_span: Span) {
+fn check_replace_with_uninit(cx: &LateContext<'_, '_>, src: &Expr<'_>, expr_span: Span) {
     if let ExprKind::Call(ref repl_func, ref repl_args) = src.kind {
         if_chain! {
             if repl_args.is_empty();
@@ -164,7 +164,7 @@ fn check_replace_with_uninit(cx: &LateContext<'_, '_>, src: &Expr, expr_span: Sp
     }
 }
 
-fn check_replace_with_default(cx: &LateContext<'_, '_>, src: &Expr, dest: &Expr, expr_span: Span) {
+fn check_replace_with_default(cx: &LateContext<'_, '_>, src: &Expr<'_>, dest: &Expr<'_>, expr_span: Span) {
     if let ExprKind::Call(ref repl_func, _) = src.kind {
         if_chain! {
             if !in_external_macro(cx.tcx.sess, expr_span);
index c396c3ab8a8594dab9c0fa7c96aa84cba2d98612..cd3336bdb37845af6a5754b42da8583c74961d8c 100644 (file)
@@ -6,7 +6,7 @@
 pub use lint::LINT_LEVELS;
 
 // begin lint list, do not remove this comment, it’s used in `update_lints`
-pub const ALL_LINTS: [Lint; 342] = [
+pub const ALL_LINTS: [Lint; 343] = [
     Lint {
         name: "absurd_extreme_comparisons",
         group: "correctness",