diff options
| author | bors <bors@rust-lang.org> | 2019-07-13 17:11:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-07-13 17:11:36 +0000 |
| commit | 69656fa4cbafc378fd63f9186d93b0df3cdd9320 (patch) | |
| tree | 690b6c3c570374a457a346b7462c8c7c9061d6c3 /src/librustc_codegen_ssa | |
| parent | ec30876f30082a7b32876bd78a8da01f11dcde1e (diff) | |
| parent | 791ceb6a9c5dfeeeb5fc6098db2022a99c2eec18 (diff) | |
| download | rust-69656fa4cbafc378fd63f9186d93b0df3cdd9320.tar.gz rust-69656fa4cbafc378fd63f9186d93b0df3cdd9320.zip | |
Auto merge of #62659 - Centril:rollup-90oz643, r=Centril
Rollup of 5 pull requests Successful merges: - #62577 (Add an AtomicCell abstraction) - #62585 (Make struct_tail normalize when possible) - #62604 (Handle errors during error recovery gracefully) - #62636 (rustbuild: Improve assert about building tools once) - #62651 (Make some rustc macros more hygienic) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/base.rs | 3 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/traits/type_.rs | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/librustc_codegen_ssa/base.rs b/src/librustc_codegen_ssa/base.rs index ca7e17ec97a..00471095f2f 100644 --- a/src/librustc_codegen_ssa/base.rs +++ b/src/librustc_codegen_ssa/base.rs @@ -128,7 +128,8 @@ pub fn unsized_info<'tcx, Cx: CodegenMethods<'tcx>>( target: Ty<'tcx>, old_info: Option<Cx::Value>, ) -> Cx::Value { - let (source, target) = cx.tcx().struct_lockstep_tails(source, target); + let (source, target) = + cx.tcx().struct_lockstep_tails_erasing_lifetimes(source, target, cx.param_env()); match (&source.sty, &target.sty) { (&ty::Array(_, len), &ty::Slice(_)) => { cx.const_usize(len.unwrap_usize(cx.tcx())) diff --git a/src/librustc_codegen_ssa/traits/type_.rs b/src/librustc_codegen_ssa/traits/type_.rs index aa38d8d5184..13f72e23819 100644 --- a/src/librustc_codegen_ssa/traits/type_.rs +++ b/src/librustc_codegen_ssa/traits/type_.rs @@ -77,11 +77,12 @@ pub trait DerivedTypeMethods<'tcx>: BaseTypeMethods<'tcx> + MiscMethods<'tcx> { } fn type_has_metadata(&self, ty: Ty<'tcx>) -> bool { - if ty.is_sized(self.tcx().at(DUMMY_SP), ty::ParamEnv::reveal_all()) { + let param_env = ty::ParamEnv::reveal_all(); + if ty.is_sized(self.tcx().at(DUMMY_SP), param_env) { return false; } - let tail = self.tcx().struct_tail(ty); + let tail = self.tcx().struct_tail_erasing_lifetimes(ty, param_env); match tail.sty { ty::Foreign(..) => false, ty::Str | ty::Slice(..) | ty::Dynamic(..) => true, |
