Skip to content

Commit a3657c0

Browse files
committed
1 parent 7dbee3c commit a3657c0

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

README.md

Lines changed: 4 additions & 4 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-2021-09-20` toolchain.
31-
You can install it by using `rustup install nightly-2021-09-20` if you already have rustup.
30+
It's recommended to use `nightly-2021-09-30` toolchain.
31+
You can install it by using `rustup install nightly-2021-09-30` if you already have rustup.
3232
Then you can do:
3333

3434
```sh
35-
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2021-09-20
36-
$ cargo +nightly-2021-09-20 install --git https://github.com/rust-lang/rust-semverver
35+
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2021-09-30
36+
$ cargo +nightly-2021-09-30 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-2021-09-20"
3+
channel = "nightly-2021-09-30"
44
components = ["llvm-tools-preview", "rustc-dev"]

src/translate.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,10 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
377377
) -> Option<Predicate<'tcx>> {
378378
use rustc_middle::ty::{
379379
CoercePredicate, OutlivesPredicate, PredicateKind, ProjectionPredicate, ProjectionTy,
380-
SubtypePredicate, ToPredicate, TraitPredicate, WithOptConstParam,
380+
self, SubtypePredicate, ToPredicate, TraitPredicate, WithOptConstParam,
381381
};
382382

383-
Some(
384-
match predicate.kind().skip_binder() {
383+
let pred = match predicate.kind().skip_binder() {
385384
PredicateKind::Trait(pred) => PredicateKind::Trait(
386385
if let Some((target_def_id, target_substs)) = self.translate_orig_substs(
387386
index_map,
@@ -472,9 +471,9 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
472471
),
473472
// NOTE: Only used for Chalk trait solver
474473
PredicateKind::TypeWellFormedFromEnv(_) => unimplemented!(),
475-
}
476-
.to_predicate(self.tcx),
477-
)
474+
};
475+
476+
Some(ty::Binder::dummy(pred).to_predicate(self.tcx))
478477
}
479478

480479
/// Translate a slice of predicates in the context of an item.

src/typeck.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ impl<'a, 'tcx> BoundContext<'a, 'tcx> {
7272

7373
/// Register the trait bound represented by a `TraitRef`.
7474
pub fn register_trait_ref(&mut self, checked_trait_ref: TraitRef<'tcx>) {
75-
use rustc_middle::ty::{BoundConstness, ToPredicate, TraitPredicate};
75+
use rustc_middle::ty::{BoundConstness, self, ToPredicate, TraitPredicate};
7676

77-
let predicate = PredicateKind::Trait(TraitPredicate {
77+
let predicate = ty::Binder::dummy(PredicateKind::Trait(TraitPredicate {
7878
trait_ref: checked_trait_ref,
7979
constness: BoundConstness::NotConst,
80-
})
80+
}))
8181
.to_predicate(self.infcx.tcx);
8282
let obligation = Obligation::new(ObligationCause::dummy(), self.given_param_env, predicate);
8383
self.fulfill_cx

0 commit comments

Comments
 (0)