Skip to content

Commit

Permalink
Compat with rustc 1.34.0-nightly (f6fac4225 2019-02-03)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Feb 5, 2019
1 parent 40998d4 commit 4c2dcff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/script_plugins/unrooted_must_root.rs
Expand Up @@ -144,7 +144,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
.all(|a| !a.check_name("must_root")) .all(|a| !a.check_name("must_root"))
{ {
match var.node.data { match var.node.data {
hir::VariantData::Tuple(ref fields, _) => { hir::VariantData::Tuple(ref fields, ..) => {
for ref field in fields { for ref field in fields {
let def_id = cx.tcx.hir().local_def_id(field.id); let def_id = cx.tcx.hir().local_def_id(field.id);
if is_unrooted_ty(cx, cx.tcx.type_of(def_id), false) { if is_unrooted_ty(cx, cx.tcx.type_of(def_id), false) {
Expand Down Expand Up @@ -257,8 +257,8 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
// are implemented, the `Unannotated` case could cause false-positives. // are implemented, the `Unannotated` case could cause false-positives.
// These should be fixable by adding an explicit `ref`. // These should be fixable by adding an explicit `ref`.
match pat.node { match pat.node {
hir::PatKind::Binding(hir::BindingAnnotation::Unannotated, _, _, _) | hir::PatKind::Binding(hir::BindingAnnotation::Unannotated, ..) |
hir::PatKind::Binding(hir::BindingAnnotation::Mutable, _, _, _) => { hir::PatKind::Binding(hir::BindingAnnotation::Mutable, ..) => {
let ty = cx.tables.pat_ty(pat); let ty = cx.tables.pat_ty(pat);
if is_unrooted_ty(cx, ty, self.in_new_function) { if is_unrooted_ty(cx, ty, self.in_new_function) {
cx.span_lint( cx.span_lint(
Expand Down

0 comments on commit 4c2dcff

Please sign in to comment.