Skip to content

Commit

Permalink
Fixed rebase fallout.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Regueiro committed May 5, 2020
1 parent 9549fbd commit 394a970
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/librustc_codegen_ssa/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use rustc_middle::middle::cstore::{self, LinkagePreference};
use rustc_middle::middle::lang_items;
use rustc_middle::mir::mono::{CodegenUnit, CodegenUnitNameBuilder, MonoItem};
use rustc_middle::traits::Vtable;
use rustc_middle::ty::layout::{self, HasTyCtxt, TyAndLayout};
use rustc_middle::ty::layout::{HasTyCtxt, TyAndLayout};
use rustc_middle::ty::query::Providers;
use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
use rustc_session::cgu_reuse_tracker::CguReuse;
Expand Down Expand Up @@ -167,7 +167,7 @@ pub fn unsized_info<'tcx, 'a, Bx: BuilderMethods<'a, 'tcx>>(
// Find the offset of the supertrait's vtable within the subtrait (parent) vtable.
let trait_ref = target_trait_ref.with_self_ty(tcx, source);
let vtable = tcx.codegen_fulfill_obligation((ty::ParamEnv::reveal_all(), trait_ref))
.unwrap_or_else(|| bug!("unsized_info: no vtable found"));
.unwrap_or_else(|| bug!("unsized_info: vtable not found"));
let offset = match vtable {
Vtable::VtableObject(ref data) => data.vtable_base,
// HACK(alexreg): slightly dubious solution to ICE in
Expand Down Expand Up @@ -434,7 +434,7 @@ pub fn from_immediate<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
pub fn to_immediate<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
bx: &mut Bx,
val: Bx::Value,
layout: layout::TyAndLayout<'_>,
layout: TyAndLayout<'_>,
) -> Bx::Value {
if let Abi::Scalar(ref scalar) = layout.abi {
return to_immediate_scalar(bx, val, scalar);
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_middle/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ pub trait ToPredicate<'tcx> {

impl<'tcx> ToPredicate<'tcx> for ConstnessAnd<TraitRef<'tcx>> {
fn to_predicate(&self) -> Predicate<'tcx> {
ty::Predicate::Trait(
Predicate::Trait(
ty::Binder::dummy(ty::TraitPredicate { trait_ref: self.value }),
self.constness,
)
Expand All @@ -1440,7 +1440,7 @@ impl<'tcx> ToPredicate<'tcx> for ConstnessAnd<TraitRef<'tcx>> {

impl<'tcx> ToPredicate<'tcx> for ConstnessAnd<&TraitRef<'tcx>> {
fn to_predicate(&self) -> Predicate<'tcx> {
ty::Predicate::Trait(
Predicate::Trait(
ty::Binder::dummy(ty::TraitPredicate { trait_ref: *self.value }),
self.constness,
)
Expand All @@ -1449,13 +1449,13 @@ impl<'tcx> ToPredicate<'tcx> for ConstnessAnd<&TraitRef<'tcx>> {

impl<'tcx> ToPredicate<'tcx> for ConstnessAnd<PolyTraitRef<'tcx>> {
fn to_predicate(&self) -> Predicate<'tcx> {
ty::Predicate::Trait(self.value.to_poly_trait_predicate(), self.constness)
Predicate::Trait(self.value.to_poly_trait_predicate(), self.constness)
}
}

impl<'tcx> ToPredicate<'tcx> for ConstnessAnd<&PolyTraitRef<'tcx>> {
fn to_predicate(&self) -> Predicate<'tcx> {
ty::Predicate::Trait(self.value.to_poly_trait_predicate(), self.constness)
Predicate::Trait(self.value.to_poly_trait_predicate(), self.constness)
}
}

Expand Down

0 comments on commit 394a970

Please sign in to comment.