Skip to content

Commit

Permalink
Auto merge of #3623 - phansch:rustup, r=flip1995
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Jan 3, 2019
2 parents 261ebcf + d1fffe0 commit 756b32e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/question_mark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Pass {
fn moves_by_default(cx: &LateContext<'_, '_>, expression: &Expr) -> bool {
let expr_ty = cx.tables.expr_ty(expression);

expr_ty.moves_by_default(cx.tcx, cx.param_env, expression.span)
!expr_ty.is_copy_modulo_regions(cx.tcx, cx.param_env, expression.span)
}

fn is_option(cx: &LateContext<'_, '_>, expression: &Expr) -> bool {
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ pub fn implements_trait<'a, 'tcx>(
);
cx.tcx
.infer_ctxt()
.enter(|infcx| infcx.predicate_must_hold(&obligation))
.enter(|infcx| infcx.predicate_must_hold_modulo_regions(&obligation))
}

/// Check whether this type implements Drop.
Expand Down Expand Up @@ -884,7 +884,7 @@ pub fn type_is_unsafe_function<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx
}

pub fn is_copy<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>) -> bool {
!ty.moves_by_default(cx.tcx.global_tcx(), cx.param_env, DUMMY_SP)
ty.is_copy_modulo_regions(cx.tcx.global_tcx(), cx.param_env, DUMMY_SP)
}

/// Return whether a pattern is refutable.
Expand Down

0 comments on commit 756b32e

Please sign in to comment.