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

Commit cdb5ca1

Browse files
committed
Auto merge of #198 - JohnTitor:update-nightly, r=JohnTitor
Rustup to nightly-2021-06-14 r? `@Xanewok`
2 parents 8be7aca + d48e1df commit cdb5ca1

File tree

6 files changed

+27
-21
lines changed

6 files changed

+27
-21
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-05-21` toolchain.
31-
You can install it by using `rustup install nightly-2021-05-21` if you already have rustup.
30+
It's recommended to use `nightly-2021-06-14` toolchain.
31+
You can install it by using `rustup install nightly-2021-06-14` 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-05-21
36-
$ cargo +nightly-2021-05-21 install --git https://github.com/rust-lang/rust-semverver
35+
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2021-06-14
36+
$ cargo +nightly-2021-06-14 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-05-21"
3+
channel = "nightly-2021-06-14"
44
components = ["llvm-tools-preview", "rustc-dev"]

src/bin/cargo-semver.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,8 @@ pub struct WorkInfo<'a> {
431431
impl<'a> WorkInfo<'a> {
432432
/// Construct a package/workspace pair for the `manifest_path`
433433
pub fn local(config: &'a cargo::Config, manifest_path: &Path) -> Result<WorkInfo<'a>> {
434-
let workspace = Workspace::new(&manifest_path, config)?;
435-
let package = workspace.load(&manifest_path)?;
434+
let workspace = Workspace::new(manifest_path, config)?;
435+
let package = workspace.load(manifest_path)?;
436436
Ok(Self { package, workspace })
437437
}
438438

@@ -443,7 +443,7 @@ impl<'a> WorkInfo<'a> {
443443
&PackageNameAndVersion { name, version }: &PackageNameAndVersion,
444444
) -> Result<WorkInfo<'a>> {
445445
let source = {
446-
let source_id = SourceId::crates_io(&config)?;
446+
let source_id = SourceId::crates_io(config)?;
447447
let mut source = RegistrySource::remote(source_id, &HashSet::new(), config);
448448

449449
debug!("source id loaded: {:?}", source_id);

src/changes.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ impl<'a> Serialize for RPathChanges<'a> {
11821182
let mut seq = serializer.serialize_seq(Some(self.1.len()))?;
11831183

11841184
for e in &self.1 {
1185-
seq.serialize_element(&RPathChange(self.0, &e))?;
1185+
seq.serialize_element(&RPathChange(self.0, e))?;
11861186
}
11871187

11881188
seq.end()
@@ -1263,14 +1263,14 @@ pub mod tests {
12631263

12641264
impl Arbitrary for DefId_ {
12651265
fn arbitrary(g: &mut Gen) -> DefId_ {
1266-
use rustc_hir::def_id::{CrateId, CrateNum, DefIndex};
1266+
use rustc_hir::def_id::{CrateNum, DefIndex};
12671267

12681268
// NOTE: These inner types are defined via `rustc_index::newtype_index`
12691269
// macro which leaves trailing 256 values for possible enum-packing
12701270
// so make sure to generate values only from valid value range
12711271
let a: u32 = Arbitrary::arbitrary(g);
1272-
let a = if a > CrateId::MAX_AS_U32 {
1273-
CrateId::MAX_AS_U32
1272+
let a = if a > CrateNum::MAX_AS_U32 {
1273+
CrateNum::MAX_AS_U32
12741274
} else {
12751275
a
12761276
};
@@ -1282,7 +1282,7 @@ pub mod tests {
12821282
};
12831283

12841284
DefId_(DefId {
1285-
krate: CrateNum::Index(CrateId::from_u32(a)),
1285+
krate: CrateNum::from_u32(a),
12861286
index: DefIndex::from(b),
12871287
})
12881288
}

src/mismatch.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
118118
fn relate_with_variance<T: Relate<'tcx>>(
119119
&mut self,
120120
_: ty::Variance,
121+
_: ty::VarianceDiagInfo<'tcx>,
121122
a: T,
122123
b: T,
123124
) -> RelateResult<'tcx, T> {
@@ -197,7 +198,12 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
197198
None
198199
}
199200
(&TyKind::RawPtr(a_mt), &TyKind::RawPtr(b_mt)) => {
200-
let _ = self.relate(a_mt, b_mt)?;
201+
let _ = ty::relate::relate_type_and_mut(
202+
self,
203+
a_mt,
204+
b_mt,
205+
ty::VarianceDiagMutKind::RawPtr,
206+
)?;
201207
None
202208
}
203209
(&TyKind::Ref(a_r, a_ty, _), &TyKind::Ref(b_r, b_ty, _)) => {

src/translate.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
311311
debug!("translating type param: {:?}", param);
312312
let type_param = self.id_mapping.get_type_param(&target_def_id);
313313
debug!("translated type param: {:?}", type_param);
314-
match self.tcx.mk_param_from_def(&type_param).unpack() {
314+
match self.tcx.mk_param_from_def(type_param).unpack() {
315315
GenericArgKind::Type(param_t) => param_t,
316316
_ => unreachable!(),
317317
}
@@ -366,7 +366,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
366366

367367
/// Translate an item's type.
368368
pub fn translate_item_type(&self, orig_def_id: DefId, orig: Ty<'tcx>) -> Ty<'tcx> {
369-
self.translate(&self.construct_index_map(orig_def_id), &orig)
369+
self.translate(&self.construct_index_map(orig_def_id), orig)
370370
}
371371

372372
/// Translate a predicate using a type parameter index map.
@@ -420,7 +420,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
420420
substs: target_substs,
421421
item_def_id: target_def_id,
422422
},
423-
ty: self.translate(index_map, &pred.ty),
423+
ty: self.translate(index_map, pred.ty),
424424
}
425425
} else {
426426
return None;
@@ -434,7 +434,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
434434
}
435435
PredicateKind::ClosureKind(did, substs, kind) => PredicateKind::ClosureKind(
436436
self.translate_orig(did),
437-
self.translate(index_map, &substs),
437+
self.translate(index_map, substs),
438438
kind,
439439
),
440440
PredicateKind::Subtype(pred) => PredicateKind::Subtype({
@@ -459,8 +459,8 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
459459
}
460460
}
461461
PredicateKind::ConstEquate(c1, c2) => PredicateKind::ConstEquate(
462-
self.translate(index_map, &c1),
463-
self.translate(index_map, &c2),
462+
self.translate(index_map, c1),
463+
self.translate(index_map, c2),
464464
),
465465
// NOTE: Only used for Chalk trait solver
466466
PredicateKind::TypeWellFormedFromEnv(_) => unimplemented!(),
@@ -513,7 +513,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
513513
let index_map = self.construct_index_map(orig_def_id);
514514
TraitRef {
515515
def_id: self.translate_orig(orig_trait_ref.def_id),
516-
substs: self.translate(&index_map, &orig_trait_ref.substs),
516+
substs: self.translate(&index_map, orig_trait_ref.substs),
517517
}
518518
}
519519

0 commit comments

Comments
 (0)