diff --git a/.travis.yml b/.travis.yml index 4ca18a93ea86e..130a7f1fa6d61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,8 +51,9 @@ matrix: # We don't want to run these always because they go towards # the build limit within the Travis rust-lang account. # The jobs are approximately sorted by execution time - - env: INTEGRATION=rust-lang/cargo - if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try) + # disabled cargo integration test due to https://github.com/rust-lang/rust-clippy/issues/4121 + #- env: INTEGRATION=rust-lang/cargo + # if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try) - env: INTEGRATION=rust-lang-nursery/chalk if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try) - env: INTEGRATION=rust-lang/rls diff --git a/clippy_lints/src/enum_variants.rs b/clippy_lints/src/enum_variants.rs index 4479349aaf4a0..782d80a7b643b 100644 --- a/clippy_lints/src/enum_variants.rs +++ b/clippy_lints/src/enum_variants.rs @@ -248,7 +248,7 @@ impl EarlyLintPass for EnumVariantNames { if let Some(&(ref mod_name, ref mod_camel)) = self.modules.last() { // constants don't have surrounding modules if !mod_camel.is_empty() { - if *mod_name == item_name { + if mod_name.as_symbol() == item.ident.name { if let ItemKind::Mod(..) = item.node { span_lint( cx, diff --git a/clippy_lints/src/format.rs b/clippy_lints/src/format.rs index 25a5e2eca4386..2eaa1ac456474 100644 --- a/clippy_lints/src/format.rs +++ b/clippy_lints/src/format.rs @@ -61,7 +61,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UselessFormat { then { let (message, sugg) = if_chain! { if let ExprKind::MethodCall(ref path, _, _) = format_arg.node; - if path.ident.as_interned_str() == "to_string"; + if path.ident.as_interned_str().as_symbol() == sym!(to_string); then { ("`to_string()` is enough", snippet(cx, format_arg.span, "").to_string()) diff --git a/clippy_lints/src/utils/higher.rs b/clippy_lints/src/utils/higher.rs index 6ba2f91eb03af..dda05d3fbc524 100644 --- a/clippy_lints/src/utils/higher.rs +++ b/clippy_lints/src/utils/higher.rs @@ -63,10 +63,10 @@ pub fn range<'a, 'b, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'b hir::Expr) -> O if def_path.data.len() != 3 { return None; } - if def_path.data.get(0)?.data.as_interned_str() != "ops" { + if def_path.data.get(0)?.data.as_interned_str().as_symbol() != sym!(ops) { return None; } - if def_path.data.get(1)?.data.as_interned_str() != "range" { + if def_path.data.get(1)?.data.as_interned_str().as_symbol() != sym!(range) { return None; } let type_name = def_path.data.get(2)?.data.as_interned_str();