summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/clippy_lints/src/entry.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/clippy_lints/src/entry.rs')
-rw-r--r--src/tools/clippy/clippy_lints/src/entry.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/clippy/clippy_lints/src/entry.rs b/src/tools/clippy/clippy_lints/src/entry.rs
index 6197b5b19..3e3c62e85 100644
--- a/src/tools/clippy/clippy_lints/src/entry.rs
+++ b/src/tools/clippy/clippy_lints/src/entry.rs
@@ -23,7 +23,7 @@ declare_clippy_lint! {
///
/// ### Known problems
/// The suggestion may have type inference errors in some cases. e.g.
- /// ```rust
+ /// ```no_run
/// let mut map = std::collections::HashMap::new();
/// let _ = if !map.contains_key(&0) {
/// map.insert(0, 0)
@@ -33,7 +33,7 @@ declare_clippy_lint! {
/// ```
///
/// ### Example
- /// ```rust
+ /// ```no_run
/// # use std::collections::HashMap;
/// # let mut map = HashMap::new();
/// # let k = 1;
@@ -43,7 +43,7 @@ declare_clippy_lint! {
/// }
/// ```
/// Use instead:
- /// ```rust
+ /// ```no_run
/// # use std::collections::HashMap;
/// # let mut map = HashMap::new();
/// # let k = 1;
@@ -241,7 +241,7 @@ fn try_parse_contains<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'_>) -> Optio
},
],
_,
- ) if key_span.ctxt() == expr.span.ctxt() => {
+ ) if key_span.eq_ctxt(expr.span) => {
let id = cx.typeck_results().type_dependent_def_id(expr.hir_id)?;
let expr = ContainsExpr {
negated,