Skip to content

Commit a6cf352

Browse files
committed
Rustup to rustc 1.36.0-nightly (dbfe70d 2019-05-22)
1 parent 2cc23a5 commit a6cf352

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

clippy_lints/src/enum_variants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl EarlyLintPass for EnumVariantNames {
248248
if let Some(&(ref mod_name, ref mod_camel)) = self.modules.last() {
249249
// constants don't have surrounding modules
250250
if !mod_camel.is_empty() {
251-
if *mod_name == item_name {
251+
if mod_name.as_symbol() == item.ident.name {
252252
if let ItemKind::Mod(..) = item.node {
253253
span_lint(
254254
cx,

clippy_lints/src/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UselessFormat {
6161
then {
6262
let (message, sugg) = if_chain! {
6363
if let ExprKind::MethodCall(ref path, _, _) = format_arg.node;
64-
if path.ident.as_interned_str() == "to_string";
64+
if path.ident.as_interned_str().as_symbol() == sym!(to_string);
6565
then {
6666
("`to_string()` is enough",
6767
snippet(cx, format_arg.span, "<arg>").to_string())

clippy_lints/src/utils/higher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ pub fn range<'a, 'b, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'b hir::Expr) -> O
6363
if def_path.data.len() != 3 {
6464
return None;
6565
}
66-
if def_path.data.get(0)?.data.as_interned_str() != "ops" {
66+
if def_path.data.get(0)?.data.as_interned_str().as_symbol() != sym!(ops) {
6767
return None;
6868
}
69-
if def_path.data.get(1)?.data.as_interned_str() != "range" {
69+
if def_path.data.get(1)?.data.as_interned_str().as_symbol() != sym!(range) {
7070
return None;
7171
}
7272
let type_name = def_path.data.get(2)?.data.as_interned_str();

0 commit comments

Comments
 (0)