Fix rebase

This commit is contained in:
varkor 2019-09-25 15:57:54 +01:00
parent bd5adc51fb
commit 93df1bb517
5 changed files with 7 additions and 7 deletions

View File

@ -1604,7 +1604,7 @@ impl<'a, 'tcx> ShallowResolver<'a, 'tcx> {
// are extremely hot.
#[inline(always)]
pub fn shallow_resolve_changed(&mut self, typ: Ty<'tcx>) -> bool {
match typ.sty {
match typ.kind {
ty::Infer(ty::TyVar(v)) => {
use self::type_variable::TypeVariableValue;

View File

@ -1463,7 +1463,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
ty::Predicate::Trait(ref data) => {
let trait_ref = data.to_poly_trait_ref();
let self_ty = trait_ref.self_ty();
debug!("self_ty {:?} {:?} trait_ref {:?}", self_ty, self_ty.sty, trait_ref);
debug!("self_ty {:?} {:?} trait_ref {:?}", self_ty, self_ty.kind, trait_ref);
if predicate.references_error() {
return;

View File

@ -373,9 +373,9 @@ impl Trait for X {
debug!(
"note_and_explain_type_err expected={:?} ({:?}) found={:?} ({:?})",
values.expected,
values.expected.sty,
values.expected.kind,
values.found,
values.found.sty,
values.found.kind,
);
},
CyclicTy(ty) => {

View File

@ -608,7 +608,7 @@ pub fn const_eval_provider<'tcx>(
// Catch such calls and evaluate them instead of trying to load a constant's MIR.
if let ty::InstanceDef::Intrinsic(def_id) = key.value.instance.def {
let ty = key.value.instance.ty(tcx);
let substs = match ty.sty {
let substs = match ty.kind {
ty::FnDef(_, substs) => substs,
_ => bug!("intrinsic with type {:?}", ty),
};

View File

@ -718,10 +718,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// More generally, the expected type wants a tuple variant with one field of an
// N-arity-tuple, e.g., `V_i((p_0, .., p_N))`. Meanwhile, the user supplied a pattern
// with the subpatterns directly in the tuple variant pattern, e.g., `V_i(p_0, .., p_N)`.
let missing_parenthesis = match expected.sty {
let missing_parenthesis = match expected.kind {
ty::Adt(_, substs) if fields.len() == 1 => {
let field_ty = fields[0].ty(self.tcx, substs);
match field_ty.sty {
match field_ty.kind {
ty::Tuple(_) => field_ty.tuple_fields().count() == subpats.len(),
_ => false,
}