Skip to content

Commit fdeaf80

Browse files
authored
Merge pull request #2205 from kraai/2204
Fix compilation errors with rustc 1.23.0-nightly (d762b1d 2017-11-04)
2 parents 4018b0a + b778659 commit fdeaf80

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

clippy_lints/src/functions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
8686
use rustc::hir::map::Node::*;
8787

8888
let is_impl = if let Some(NodeItem(item)) = cx.tcx.hir.find(cx.tcx.hir.get_parent_node(nodeid)) {
89-
matches!(item.node, hir::ItemImpl(_, _, _, _, Some(_), _, _) | hir::ItemDefaultImpl(..))
89+
matches!(item.node, hir::ItemImpl(_, _, _, _, Some(_), _, _) | hir::ItemAutoImpl(..))
9090
} else {
9191
false
9292
};

clippy_lints/src/len_zero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LenZero {
6868
}
6969

7070
match item.node {
71-
ItemTrait(_, _, _, ref trait_items) => check_trait_items(cx, item, trait_items),
71+
ItemTrait(_, _, _, _, ref trait_items) => check_trait_items(cx, item, trait_items),
7272
ItemImpl(_, _, _, _, None, _, ref impl_items) => check_impl_items(cx, item, impl_items),
7373
_ => (),
7474
}

clippy_lints/src/missing_doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
132132
hir::ItemGlobalAsm(..) => "an assembly blob",
133133
hir::ItemTy(..) => "a type alias",
134134
hir::ItemUnion(..) => "a union",
135-
hir::ItemDefaultImpl(..) |
135+
hir::ItemAutoImpl(..) |
136136
hir::ItemExternCrate(..) |
137137
hir::ItemForeignMod(..) |
138138
hir::ItemImpl(..) |

clippy_lints/src/needless_pass_by_value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
8787

8888
// Exclude non-inherent impls
8989
if let Some(NodeItem(item)) = cx.tcx.hir.find(cx.tcx.hir.get_parent_node(node_id)) {
90-
if matches!(item.node, ItemImpl(_, _, _, _, Some(_), _, _) | ItemDefaultImpl(..)) {
90+
if matches!(item.node, ItemImpl(_, _, _, _, Some(_), _, _) | ItemAutoImpl(..)) {
9191
return;
9292
}
9393
}

clippy_lints/src/utils/inspector.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,14 +397,14 @@ fn print_item(cx: &LateContext, item: &hir::Item) {
397397
},
398398
hir::ItemTrait(..) => {
399399
println!("trait decl");
400-
if cx.tcx.trait_has_default_impl(did) {
401-
println!("trait has a default impl");
400+
if cx.tcx.trait_is_auto(did) {
401+
println!("trait is auto");
402402
} else {
403-
println!("trait has no default impl");
403+
println!("trait is not auto");
404404
}
405405
},
406-
hir::ItemDefaultImpl(_, ref _trait_ref) => {
407-
println!("default impl");
406+
hir::ItemAutoImpl(_, ref _trait_ref) => {
407+
println!("auto impl");
408408
},
409409
hir::ItemImpl(_, _, _, _, Some(ref _trait_ref), _, _) => {
410410
println!("trait impl");

0 commit comments

Comments
 (0)