Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Update nightly toolchain #269

Merged
merged 4 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-09-30` toolchain.
You can install it by using `rustup install nightly-2021-09-30` if you already have rustup.
It's recommended to use `nightly-2021-10-25` toolchain.
You can install it by using `rustup install nightly-2021-10-25` if you already have rustup.
Then you can do:

```sh
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2021-09-30
$ cargo +nightly-2021-09-30 install --git https://github.com/rust-lang/rust-semverver
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2021-10-25
$ cargo +nightly-2021-10-25 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-09-30"
channel = "nightly-2021-10-25"
components = ["llvm-tools-preview", "rustc-dev"]
1 change: 1 addition & 0 deletions src/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
substs: target_substs,
},
constness: pred.constness,
polarity: pred.polarity,
}
} else {
return None;
Expand Down
5 changes: 2 additions & 3 deletions src/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use crate::{
typeck::{BoundContext, TypeComparisonContext},
};
use log::{debug, info};
use rustc_const_eval::const_eval::is_const_fn;
use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res, Res::Def};
use rustc_hir::def_id::DefId;
use rustc_hir::hir_id::HirId;
Expand Down Expand Up @@ -363,8 +362,8 @@ fn diff_fn<'tcx>(changes: &mut ChangeSet, tcx: TyCtxt<'tcx>, old: Res, new: Res)
let old_def_id = old.def_id();
let new_def_id = new.def_id();

let old_const = is_const_fn(tcx, old_def_id);
let new_const = is_const_fn(tcx, new_def_id);
let old_const = tcx.is_const_fn(old_def_id);
let new_const = tcx.is_const_fn(new_def_id);

if old_const != new_const {
changes.add_change(
Expand Down
4 changes: 3 additions & 1 deletion src/typeck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ use rustc_middle::{
error::TypeError,
fold::TypeFoldable,
subst::{GenericArg, InternalSubsts, SubstsRef},
GenericParamDefKind, ParamEnv, Predicate, PredicateKind, TraitRef, Ty, TyCtxt,
GenericParamDefKind, ImplPolarity, ParamEnv, Predicate, PredicateKind, TraitRef, Ty,
TyCtxt,
},
};
use rustc_trait_selection::traits::FulfillmentContext;
Expand Down Expand Up @@ -77,6 +78,7 @@ impl<'a, 'tcx> BoundContext<'a, 'tcx> {
let predicate = ty::Binder::dummy(PredicateKind::Trait(TraitPredicate {
trait_ref: checked_trait_ref,
constness: BoundConstness::NotConst,
polarity: ImplPolarity::Positive,
}))
.to_predicate(self.infcx.tcx);
let obligation = Obligation::new(ObligationCause::dummy(), self.given_param_env, predicate);
Expand Down
4 changes: 2 additions & 2 deletions tests/cases/pathologic_paths/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ warning: path changes to `a`
... |
16 | | _ _ _ _ _ _ _ _
17 | | _ _ _ _ _ _ _ _);
| |_______________________^
| |______________________^
|
= note: added definition (technically breaking)
= note: this warning originates in the macro `blow` (in Nightly builds, run with -Z macro-backtrace for more info)
Expand All @@ -24,7 +24,7 @@ warning: path changes to `b`
... |
16 | | _ _ _ _ _ _ _ _
17 | | _ _ _ _ _ _ _ _);
| |_______________________^
| |______________________^
|
= note: added definition (technically breaking)
= note: this warning originates in the macro `blow` (in Nightly builds, run with -Z macro-backtrace for more info)
Expand Down