Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustup: https://github.com/rust-lang/rust/pull/55517 #3623

Merged
merged 1 commit into from Jan 3, 2019
Merged
Changes from all commits
Commits
File filter
Filter file types
Beta Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -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 {
@@ -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.
@@ -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.
ProTip! Use n and p to navigate between commits in a pull request.