Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Oct 13, 2021
1 parent b494170 commit 2d603a2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
8 changes: 4 additions & 4 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-2021-07-23` toolchain.
You can install it by using `rustup install nightly-2021-07-23` if you already have rustup.
It's recommended to use `nightly-2021-08-16` toolchain.
You can install it by using `rustup install nightly-2021-08-16` if you already have rustup.
Then you can do:

```sh
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2021-07-23
$ cargo +nightly-2021-07-23 install --git https://github.com/rust-lang/rust-semverver
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2021-08-16
$ cargo +nightly-2021-08-16 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-2021-07-23"
channel = "nightly-2021-08-16"
components = ["llvm-tools-preview", "rustc-dev"]
4 changes: 2 additions & 2 deletions src/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {

Some(
match predicate.kind().skip_binder() {
PredicateKind::Trait(pred, constness) => PredicateKind::Trait(
PredicateKind::Trait(pred) => PredicateKind::Trait(
if let Some((target_def_id, target_substs)) = self.translate_orig_substs(
index_map,
pred.trait_ref.def_id,
Expand All @@ -393,11 +393,11 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
def_id: target_def_id,
substs: target_substs,
},
constness: pred.constness,
}
} else {
return None;
},
constness,
),
PredicateKind::RegionOutlives(pred) => PredicateKind::RegionOutlives({
let l = self.translate_region(pred.0);
Expand Down
2 changes: 1 addition & 1 deletion src/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ fn diff_traits<'tcx>(
let old_param_env = tcx.param_env(old);

for bound in old_param_env.caller_bounds() {
if let PredicateKind::Trait(pred, _) = bound.kind().skip_binder() {
if let PredicateKind::Trait(pred) = bound.kind().skip_binder() {
let trait_ref = pred.trait_ref;

debug!("trait_ref substs (old): {:?}", trait_ref.substs);
Expand Down
10 changes: 4 additions & 6 deletions src/typeck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,10 @@ impl<'a, 'tcx> BoundContext<'a, 'tcx> {
use rustc_hir::Constness;
use rustc_middle::ty::{ToPredicate, TraitPredicate};

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

0 comments on commit 2d603a2

Please sign in to comment.