diff options
| author | bors <bors@rust-lang.org> | 2019-01-03 22:29:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-03 22:29:09 +0000 |
| commit | 756b32e1e2ad474097f8d3e510b319dd5023297d (patch) | |
| tree | ea4411cccd2c97d8102f3f72094731883b10224f | |
| parent | 261ebcfbb4f4c70230af0ec18d3d592a9825ecf0 (diff) | |
| parent | d1fffe07c5cde9ff8c830f27c26fefe8aec363d4 (diff) | |
| download | rust-756b32e1e2ad474097f8d3e510b319dd5023297d.tar.gz rust-756b32e1e2ad474097f8d3e510b319dd5023297d.zip | |
Auto merge of #3623 - phansch:rustup, r=flip1995
rustup: https://github.com/rust-lang/rust/pull/55517 None
| -rw-r--r-- | clippy_lints/src/question_mark.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/utils/mod.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/question_mark.rs b/clippy_lints/src/question_mark.rs index 63a3a831304..c1a76eed928 100644 --- a/clippy_lints/src/question_mark.rs +++ b/clippy_lints/src/question_mark.rs @@ -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 { diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index edf8fb8d033..9b5e18413a2 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -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. |
