Skip to content

Commit be321bd

Browse files
committed
Auto merge of rust-lang#143 - Xanewok:rustup, r=Xanewok
Bump supported nightly to nightly-2020-06-23
2 parents b9d358f + f6f7538 commit be321bd

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2020-06-16
1+
nightly-2020-06-23

src/mismatch.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,14 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
133133
#[allow(clippy::similar_names)]
134134
fn tys(&mut self, a: Ty<'tcx>, b: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
135135
use rustc_middle::ty::TyKind;
136+
// NOTE: Because this pass doesn't really relate but walks and collects
137+
// matching items on the side, it doesn't really matter what we return.
138+
// Instead, return unit as dummy type (rather than an error type that
139+
// could potentially short-circuit somewhere).
140+
let dummy_type = self.tcx.types.unit;
136141

137142
if self.current_old_types.contains(a) || self.current_new_types.contains(b) {
138-
return Ok(self.tcx.types.err);
143+
return Ok(dummy_type);
139144
}
140145

141146
self.current_old_types.insert(a);
@@ -279,7 +284,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
279284
}
280285
}
281286

282-
Ok(self.tcx.types.err)
287+
Ok(dummy_type)
283288
}
284289

285290
fn regions(

src/translate.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,17 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
204204

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

208211
let res: Vec<_> = preds
209212
.iter()
210213
.map(|p| {
211214
match *p.skip_binder() {
212215
Trait(existential_trait_ref) => {
213216
let trait_ref = Binder::bind(existential_trait_ref)
214-
.with_self_ty(self.tcx, self.tcx.types.err);
217+
.with_self_ty(self.tcx, dummy_self);
215218
let did = trait_ref.skip_binder().def_id;
216219
let substs = trait_ref.skip_binder().substs;
217220

@@ -234,7 +237,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
234237
}
235238
Projection(existential_projection) => {
236239
let projection_pred = Binder::bind(existential_projection)
237-
.with_self_ty(self.tcx, self.tcx.types.err);
240+
.with_self_ty(self.tcx, dummy_self);
238241
let item_def_id =
239242
projection_pred.skip_binder().projection_ty.item_def_id;
240243
let substs =
@@ -561,7 +564,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for InferenceCleanupFolder<'a, 'tcx> {
561564
.tcx
562565
.mk_ref(self.infcx.tcx.lifetimes.re_erased, ty_and_mut)
563566
}
564-
TyKind::Infer(_) => self.infcx.tcx.mk_ty(TyKind::Error),
567+
TyKind::Infer(_) => self.infcx.tcx.ty_error(),
565568
_ => t1,
566569
}
567570
}

tests/full_cases/log-0.3.4-0.3.8.linux

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ warning: technically breaking changes in `<new::LogRecord<'a> as std::fmt::Debug
2323
|
2424
= note: trait impl generalized or newly added (technically breaking)
2525

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

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

160-
warning: 18 warnings emitted
161-
160+
warning: 18 warnings emitted

0 commit comments

Comments
 (0)