Skip to content

Commit

Permalink
Auto merge of rust-lang#143 - Xanewok:rustup, r=Xanewok
Browse files Browse the repository at this point in the history
Bump supported nightly to nightly-2020-06-23
  • Loading branch information
bors committed Nov 17, 2020
2 parents b9d358f + f6f7538 commit be321bd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2020-06-16
nightly-2020-06-23
9 changes: 7 additions & 2 deletions src/mismatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,14 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
#[allow(clippy::similar_names)]
fn tys(&mut self, a: Ty<'tcx>, b: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
use rustc_middle::ty::TyKind;
// NOTE: Because this pass doesn't really relate but walks and collects
// matching items on the side, it doesn't really matter what we return.
// Instead, return unit as dummy type (rather than an error type that
// could potentially short-circuit somewhere).
let dummy_type = self.tcx.types.unit;

if self.current_old_types.contains(a) || self.current_new_types.contains(b) {
return Ok(self.tcx.types.err);
return Ok(dummy_type);
}

self.current_old_types.insert(a);
Expand Down Expand Up @@ -279,7 +284,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
}
}

Ok(self.tcx.types.err)
Ok(dummy_type)
}

fn regions(
Expand Down
9 changes: 6 additions & 3 deletions src/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,17 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {

let success = Cell::new(true);
let err_pred = AutoTrait(DefId::local(CRATE_DEF_INDEX));
// A `Self` within original bounds are to be substituted
// with a `trait_object_dummy_self`.
let dummy_self = self.tcx.types.trait_object_dummy_self;

let res: Vec<_> = preds
.iter()
.map(|p| {
match *p.skip_binder() {
Trait(existential_trait_ref) => {
let trait_ref = Binder::bind(existential_trait_ref)
.with_self_ty(self.tcx, self.tcx.types.err);
.with_self_ty(self.tcx, dummy_self);
let did = trait_ref.skip_binder().def_id;
let substs = trait_ref.skip_binder().substs;

Expand All @@ -234,7 +237,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
}
Projection(existential_projection) => {
let projection_pred = Binder::bind(existential_projection)
.with_self_ty(self.tcx, self.tcx.types.err);
.with_self_ty(self.tcx, dummy_self);
let item_def_id =
projection_pred.skip_binder().projection_ty.item_def_id;
let substs =
Expand Down Expand Up @@ -561,7 +564,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for InferenceCleanupFolder<'a, 'tcx> {
.tcx
.mk_ref(self.infcx.tcx.lifetimes.re_erased, ty_and_mut)
}
TyKind::Infer(_) => self.infcx.tcx.mk_ty(TyKind::Error),
TyKind::Infer(_) => self.infcx.tcx.ty_error(),
_ => t1,
}
}
Expand Down
7 changes: 3 additions & 4 deletions tests/full_cases/log-0.3.4-0.3.8.linux
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ warning: technically breaking changes in `<new::LogRecord<'a> as std::fmt::Debug
|
= note: trait impl generalized or newly added (technically breaking)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Eq>`
warning: technically breaking changes in `<new::LogMetadata<'a> as std::marker::StructuralEq>`
--> log-0.3.8/src/lib.rs:552:10
|
552 | #[derive(Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
Expand Down Expand Up @@ -71,7 +71,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::fmt::Deb
|
= note: trait impl generalized or newly added (technically breaking)

warning: technically breaking changes in `<new::LogLocation as std::cmp::Eq>`
warning: technically breaking changes in `<new::LogLocation as std::marker::StructuralEq>`
--> log-0.3.8/src/lib.rs:604:30
|
604 | #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
Expand Down Expand Up @@ -157,5 +157,4 @@ warning: path changes to `ShutdownLoggerError`
|
= note: added definition (technically breaking)

warning: 18 warnings emitted

warning: 18 warnings emitted

0 comments on commit be321bd

Please sign in to comment.