Skip to content

Commit a61f675

Browse files
committed
Update to nightly-2020-12-20
Rustup to rust-lang/rust#80106
1 parent 537dce7 commit a61f675

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ repository and compiled from source or installed from
2727
of the nightly toolchain is supported at any given time.
2828

2929
<!-- NOTE: Keep in sync with nightly date on rust-toolchain. -->
30-
It's recommended to use `nightly-2020-12-19` toolchain.
31-
You can install it by using `rustup install nightly-2020-12-19` if you already have rustup.
30+
It's recommended to use `nightly-2020-12-20` toolchain.
31+
You can install it by using `rustup install nightly-2020-12-20` if you already have rustup.
3232
Then you can do:
3333

3434
```sh
3535
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2020-11-19
36-
$ cargo +nightly-2020-12-19 install --git https://github.com/rust-lang/rust-semverver
36+
$ cargo +nightly-2020-12-20 install --git https://github.com/rust-lang/rust-semverver
3737
```
3838

3939
You'd also need `cmake` for some dependencies, and a few common libraries (if you hit

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# NOTE: Keep in sync with nightly date on README
22
[toolchain]
3-
channel = "nightly-2020-12-19"
3+
channel = "nightly-2020-12-20"
44
components = ["llvm-tools-preview", "rustc-dev"]

src/mismatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
308308
a: ty::Binder<T>,
309309
b: ty::Binder<T>,
310310
) -> RelateResult<'tcx, ty::Binder<T>> {
311-
Ok(ty::Binder::bind(
311+
Ok(a.rebind(
312312
self.relate(a.skip_binder(), b.skip_binder())?,
313313
))
314314
}

src/translate.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,12 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
376376
predicate: Predicate<'tcx>,
377377
) -> Option<Predicate<'tcx>> {
378378
use rustc_middle::ty::{
379-
OutlivesPredicate, PredicateAtom, PredicateKind, ProjectionPredicate, ProjectionTy,
380-
SubtypePredicate, ToPredicate, TraitPredicate, WithOptConstParam,
379+
Binder, OutlivesPredicate, PredicateAtom, PredicateKind, ProjectionPredicate,
380+
ProjectionTy, SubtypePredicate, ToPredicate, TraitPredicate, WithOptConstParam,
381381
};
382382

383383
Some(match predicate.skip_binders() {
384-
PredicateAtom::Trait(pred, constness) => PredicateAtom::Trait(
384+
PredicateAtom::Trait(pred, constness) => Binder::bind(PredicateAtom::Trait(
385385
if let Some((target_def_id, target_substs)) = self.translate_orig_substs(
386386
index_map,
387387
pred.trait_ref.def_id,
@@ -397,21 +397,21 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
397397
return None;
398398
},
399399
constness,
400-
)
400+
))
401401
.potentially_quantified(self.tcx, PredicateKind::ForAll),
402-
PredicateAtom::RegionOutlives(pred) => PredicateAtom::RegionOutlives({
402+
PredicateAtom::RegionOutlives(pred) => Binder::bind(PredicateAtom::RegionOutlives({
403403
let l = self.translate_region(pred.0);
404404
let r = self.translate_region(pred.1);
405405
OutlivesPredicate(l, r)
406-
})
406+
}))
407407
.potentially_quantified(self.tcx, PredicateKind::ForAll),
408-
PredicateAtom::TypeOutlives(pred) => PredicateAtom::TypeOutlives({
408+
PredicateAtom::TypeOutlives(pred) => Binder::bind(PredicateAtom::TypeOutlives({
409409
let l = self.translate(index_map, pred.0);
410410
let r = self.translate_region(pred.1);
411411
OutlivesPredicate(l, r)
412-
})
412+
}))
413413
.potentially_quantified(self.tcx, PredicateKind::ForAll),
414-
PredicateAtom::Projection(pred) => PredicateAtom::Projection(
414+
PredicateAtom::Projection(pred) => Binder::bind(PredicateAtom::Projection(
415415
if let Some((target_def_id, target_substs)) = self.translate_orig_substs(
416416
index_map,
417417
pred.projection_ty.item_def_id,
@@ -427,7 +427,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
427427
} else {
428428
return None;
429429
},
430-
)
430+
))
431431
.potentially_quantified(self.tcx, PredicateKind::ForAll),
432432
PredicateAtom::WellFormed(ty) => {
433433
PredicateAtom::WellFormed(self.translate(index_map, ty)).to_predicate(self.tcx)

src/typeck.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ impl<'a, 'tcx> BoundContext<'a, 'tcx> {
7474
/// Register the trait bound represented by a `TraitRef`.
7575
pub fn register_trait_ref(&mut self, checked_trait_ref: TraitRef<'tcx>) {
7676
use rustc_hir::Constness;
77-
use rustc_middle::ty::TraitPredicate;
77+
use rustc_middle::ty::{Binder, TraitPredicate};
7878

79-
let predicate = PredicateAtom::Trait(
79+
let predicate = Binder::bind(PredicateAtom::Trait(
8080
TraitPredicate {
8181
trait_ref: checked_trait_ref,
8282
},
8383
Constness::NotConst,
84-
)
84+
))
8585
.potentially_quantified(self.infcx.tcx, PredicateKind::ForAll);
8686
let obligation = Obligation::new(ObligationCause::dummy(), self.given_param_env, predicate);
8787
self.fulfill_cx

0 commit comments

Comments
 (0)