diff options
| author | flip1995 <hello@philkrones.com> | 2018-11-20 14:06:29 +0100 |
|---|---|---|
| committer | flip1995 <hello@philkrones.com> | 2018-11-27 15:29:23 +0100 |
| commit | 9096269610fcfc5cdc719dbe7d817de4cbb75201 (patch) | |
| tree | 5da45bfe0275527c9107cd1d60dd04a1162875ba /clippy_lints/src/reference.rs | |
| parent | fad267c3b32895999f464c640d603f923fa0eeba (diff) | |
Add Applicability::Unspecified to span_lint_and_sugg functions
Diffstat (limited to 'clippy_lints/src/reference.rs')
| -rw-r--r-- | clippy_lints/src/reference.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clippy_lints/src/reference.rs b/clippy_lints/src/reference.rs index 79d30612cbd..aac3d09bfd3 100644 --- a/clippy_lints/src/reference.rs +++ b/clippy_lints/src/reference.rs @@ -8,11 +8,12 @@ // except according to those terms. -use crate::syntax::ast::{Expr, ExprKind, UnOp}; use crate::rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass}; use crate::rustc::{declare_tool_lint, lint_array}; -use if_chain::if_chain; +use crate::rustc_errors::Applicability; +use crate::syntax::ast::{Expr, ExprKind, UnOp}; use crate::utils::{snippet, span_lint_and_sugg}; +use if_chain::if_chain; /// **What it does:** Checks for usage of `*&` and `*&mut` in expressions. /// @@ -61,6 +62,7 @@ impl EarlyLintPass for Pass { "immediately dereferencing a reference", "try this", format!("{}", snippet(cx, addrof_target.span, "_")), + Applicability::Unspecified, ); } } @@ -110,7 +112,8 @@ impl EarlyLintPass for DerefPass { "{}.{}", snippet(cx, inner.span, "_"), snippet(cx, field_name.span, "_") - ) + ), + Applicability::Unspecified, ); } } |
