Skip to content

Commit

Permalink
Update to nightly-2020-12-20
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Mar 31, 2021
1 parent 537dce7 commit a61f675
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ repository and compiled from source or installed from
of the nightly toolchain is supported at any given time.

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

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

You'd also need `cmake` for some dependencies, and a few common libraries (if you hit
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NOTE: Keep in sync with nightly date on README
[toolchain]
channel = "nightly-2020-12-19"
channel = "nightly-2020-12-20"
components = ["llvm-tools-preview", "rustc-dev"]
2 changes: 1 addition & 1 deletion src/mismatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
a: ty::Binder<T>,
b: ty::Binder<T>,
) -> RelateResult<'tcx, ty::Binder<T>> {
Ok(ty::Binder::bind(
Ok(a.rebind(
self.relate(a.skip_binder(), b.skip_binder())?,
))
}
Expand Down
20 changes: 10 additions & 10 deletions src/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,12 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
predicate: Predicate<'tcx>,
) -> Option<Predicate<'tcx>> {
use rustc_middle::ty::{
OutlivesPredicate, PredicateAtom, PredicateKind, ProjectionPredicate, ProjectionTy,
SubtypePredicate, ToPredicate, TraitPredicate, WithOptConstParam,
Binder, OutlivesPredicate, PredicateAtom, PredicateKind, ProjectionPredicate,
ProjectionTy, SubtypePredicate, ToPredicate, TraitPredicate, WithOptConstParam,
};

Some(match predicate.skip_binders() {
PredicateAtom::Trait(pred, constness) => PredicateAtom::Trait(
PredicateAtom::Trait(pred, constness) => Binder::bind(PredicateAtom::Trait(
if let Some((target_def_id, target_substs)) = self.translate_orig_substs(
index_map,
pred.trait_ref.def_id,
Expand All @@ -397,21 +397,21 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
return None;
},
constness,
)
))
.potentially_quantified(self.tcx, PredicateKind::ForAll),
PredicateAtom::RegionOutlives(pred) => PredicateAtom::RegionOutlives({
PredicateAtom::RegionOutlives(pred) => Binder::bind(PredicateAtom::RegionOutlives({
let l = self.translate_region(pred.0);
let r = self.translate_region(pred.1);
OutlivesPredicate(l, r)
})
}))
.potentially_quantified(self.tcx, PredicateKind::ForAll),
PredicateAtom::TypeOutlives(pred) => PredicateAtom::TypeOutlives({
PredicateAtom::TypeOutlives(pred) => Binder::bind(PredicateAtom::TypeOutlives({
let l = self.translate(index_map, pred.0);
let r = self.translate_region(pred.1);
OutlivesPredicate(l, r)
})
}))
.potentially_quantified(self.tcx, PredicateKind::ForAll),
PredicateAtom::Projection(pred) => PredicateAtom::Projection(
PredicateAtom::Projection(pred) => Binder::bind(PredicateAtom::Projection(
if let Some((target_def_id, target_substs)) = self.translate_orig_substs(
index_map,
pred.projection_ty.item_def_id,
Expand All @@ -427,7 +427,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
} else {
return None;
},
)
))
.potentially_quantified(self.tcx, PredicateKind::ForAll),
PredicateAtom::WellFormed(ty) => {
PredicateAtom::WellFormed(self.translate(index_map, ty)).to_predicate(self.tcx)
Expand Down
6 changes: 3 additions & 3 deletions src/typeck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ impl<'a, 'tcx> BoundContext<'a, 'tcx> {
/// Register the trait bound represented by a `TraitRef`.
pub fn register_trait_ref(&mut self, checked_trait_ref: TraitRef<'tcx>) {
use rustc_hir::Constness;
use rustc_middle::ty::TraitPredicate;
use rustc_middle::ty::{Binder, TraitPredicate};

let predicate = PredicateAtom::Trait(
let predicate = Binder::bind(PredicateAtom::Trait(
TraitPredicate {
trait_ref: checked_trait_ref,
},
Constness::NotConst,
)
))
.potentially_quantified(self.infcx.tcx, PredicateKind::ForAll);
let obligation = Obligation::new(ObligationCause::dummy(), self.given_param_env, predicate);
self.fulfill_cx
Expand Down

0 comments on commit a61f675

Please sign in to comment.