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

Commit e1c419a

Browse files
committed
Update docs and format code
1 parent de000ba commit e1c419a

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-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-11-30` toolchain.
31-
You can install it by using `rustup install nightly-2021-11-30` if you already have rustup.
30+
It's recommended to use `nightly-2021-12-31` toolchain.
31+
You can install it by using `rustup install nightly-2021-12-31` 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-11-30
36-
$ cargo +nightly-2021-11-30 install --git https://github.com/rust-lang/rust-semverver
35+
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2021-12-31
36+
$ cargo +nightly-2021-12-31 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

src/mismatch.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
198198
None
199199
}
200200
(&TyKind::RawPtr(a_mt), &TyKind::RawPtr(b_mt)) => {
201-
let _ = ty::relate::relate_type_and_mut(
202-
self,
203-
a_mt,
204-
b_mt,
205-
a,
206-
)?;
201+
let _ = ty::relate::relate_type_and_mut(self, a_mt, b_mt, a)?;
207202
None
208203
}
209204
(&TyKind::Ref(a_r, a_ty, _), &TyKind::Ref(b_r, b_ty, _)) => {

src/translate.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
166166
use rustc_middle::ty::TypeAndMut;
167167
use rustc_middle::ty::{AdtDef, Binder, ExistentialProjection, ExistentialTraitRef};
168168

169-
let result = orig.fold_with(&mut BottomUpFolder {
169+
orig.fold_with(&mut BottomUpFolder {
170170
tcx: self.tcx,
171171
ty_op: |ty| {
172172
match *ty.kind() {
@@ -327,8 +327,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
327327
},
328328
lt_op: |region| self.translate_region(region),
329329
ct_op: |konst| konst, // TODO: translate consts
330-
});
331-
result
330+
})
332331
}
333332

334333
/// Translate a region.

src/traverse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub fn run_traversal(tcx: TyCtxt, new: DefId) {
8585

8686
// Pull a module from the queue, with its global visibility.
8787
while let Some((new_def_id, idents, new_vis)) = mod_queue.pop_front() {
88-
for item in tcx.item_children(new_def_id).to_vec() {
88+
for item in tcx.item_children(new_def_id).iter().copied() {
8989
let n_vis = get_vis(new_vis, item);
9090
match item.res {
9191
Def(Mod, n_def_id) => {

0 commit comments

Comments
 (0)