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

Commit 3122410

Browse files
authored
Merge pull request #116 from JohnTitor/rustup
Rustup to the latest nightly
2 parents b6783e3 + d8595e6 commit 3122410

File tree

28 files changed

+53
-33
lines changed

28 files changed

+53
-33
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ matrix:
1515
env: RUST_BACKTRACE=full
1616
- name: "osx"
1717
os: osx
18-
osx_image: xcode10
18+
osx_image: xcode11.3
1919
env: RUST_BACKTRACE=full
2020
- name: "windows"
2121
os: windows
@@ -29,7 +29,7 @@ matrix:
2929
- name: "clippy"
3030
script: |
3131
if rustup component add clippy-preview rustc-dev; then
32-
cargo clippy --all -- -D clippy::pedantic
32+
cargo clippy --all
3333
fi
3434
- name: "Shellcheck"
3535
script:

ci/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ case "${TRAVIS_OS_NAME}" in
2020
TEST_TARGET=x86_64-unknown-linux-gnu cargo test --verbose -- --nocapture
2121
;;
2222
*"windows"*)
23+
rustup target add x86_64-pc-windows-msvc
2324
TEST_TARGET=x86_64-pc-windows-msvc cargo test --verbose -- --nocapture
2425
;;
2526
*"macos"*)

src/bin/cargo_semver.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
#![allow(clippy::too_many_lines)]
44

55
extern crate curl;
6-
extern crate getopts;
76
#[macro_use]
87
extern crate serde;
8+
extern crate rustc_session;
99
extern crate serde_json;
1010

1111
use cargo::core::{Package, PackageId, Source, SourceId, Workspace};
1212
use cargo::sources::RegistrySource;
1313
use curl::easy::Easy;
1414
use log::debug;
1515
use rand::Rng;
16+
use rustc_session::getopts;
1617
use std::collections::HashSet;
1718
use std::{
1819
env,
@@ -268,8 +269,8 @@ fn run(config: &cargo::Config, matches: &getopts::Matches) -> Result<()> {
268269

269270
/// CLI utils
270271
mod cli {
271-
extern crate getopts;
272272
use cargo::util::CliError;
273+
use rustc_session::getopts;
273274

274275
/// CLI options
275276
pub fn options() -> getopts::Options {

src/mapping.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ impl Hash for InherentEntry {
4848

4949
// FIXME derive Hash again once AssocKind derives Hash again.
5050
match self.kind {
51-
AssocKind::Const => 0u8.hash(hasher),
52-
AssocKind::Method => 1u8.hash(hasher),
53-
AssocKind::OpaqueTy => 2u8.hash(hasher),
54-
AssocKind::Type => 3u8.hash(hasher),
51+
AssocKind::Const => 0_u8.hash(hasher),
52+
AssocKind::Fn => 1_u8.hash(hasher),
53+
AssocKind::OpaqueTy => 2_u8.hash(hasher),
54+
AssocKind::Type => 3_u8.hash(hasher),
5555
}
5656

5757
self.name.hash(hasher);

src/mismatch.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
129129
Relate::relate(self, a, b)
130130
}
131131

132+
// Allow this since that lint is too pedantic here.
133+
#[allow(clippy::similar_names)]
132134
fn tys(&mut self, a: Ty<'tcx>, b: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
133135
use rustc_middle::ty::TyKind;
134136

src/traverse.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,10 @@ fn diff_fn<'tcx>(changes: &mut ChangeSet, tcx: TyCtxt<'tcx>, old: Res, new: Res)
377377

378378
/// Given two method items, perform structural checks.
379379
fn diff_method<'tcx>(changes: &mut ChangeSet, tcx: TyCtxt<'tcx>, old: AssocItem, new: AssocItem) {
380-
if old.method_has_self_argument != new.method_has_self_argument {
380+
if old.fn_has_self_parameter != new.fn_has_self_parameter {
381381
changes.add_change(
382382
ChangeType::MethodSelfChanged {
383-
now_self: new.method_has_self_argument,
383+
now_self: new.fn_has_self_parameter,
384384
},
385385
old.def_id,
386386
None,
@@ -628,8 +628,8 @@ fn diff_traits<'tcx>(
628628
(Some(old_item), Some(new_item)) => {
629629
let old_def_id = old_item.def_id;
630630
let new_def_id = new_item.def_id;
631-
let old_res = Res::Def(old_item.def_kind(), old_def_id);
632-
let new_res = Res::Def(new_item.def_kind(), new_def_id);
631+
let old_res = Res::Def(old_item.kind.as_def_kind(), old_def_id);
632+
let new_res = Res::Def(new_item.kind.as_def_kind(), new_def_id);
633633

634634
id_mapping.add_trait_item(old_res, new_res, old);
635635
changes.new_change(
@@ -1127,7 +1127,8 @@ fn is_impl_trait_public<'tcx>(tcx: TyCtxt<'tcx>, impl_def_id: DefId) -> bool {
11271127

11281128
// Check if all input types of the trait implementation are public (including `Self`).
11291129
let is_public = trait_ref
1130-
.input_types()
1130+
.substs
1131+
.types()
11311132
.map(|t| type_visibility(tcx, t))
11321133
.all(|v| v == Visibility::Public);
11331134

@@ -1275,7 +1276,7 @@ fn match_inherent_impl<'tcx>(
12751276
infcx.tcx.type_of(orig_item_def_id),
12761277
infcx.tcx.type_of(target_item_def_id),
12771278
),
1278-
(AssocKind::Method, AssocKind::Method) => {
1279+
(AssocKind::Fn, AssocKind::Fn) => {
12791280
diff_method(changes, tcx, orig_item, target_item);
12801281
let orig_sig = infcx.tcx.type_of(orig_item_def_id).fn_sig(tcx);
12811282
let target_sig = infcx.tcx.type_of(target_item_def_id).fn_sig(tcx);

tests/cases/addition/stdout

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ warning: path changes to `Cde`
5454
|
5555
= note: added definition (technically breaking)
5656

57+
warning: 6 warnings emitted
58+

tests/cases/addition_path/stdout

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ warning: path changes to `d`
3030
| |_^
3131
|
3232
= note: added definition (technically breaking)
33+
34+
warning: 2 warnings emitted
35+

tests/cases/addition_use/stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ warning: path changes to `Bcd`
2727
|
2828
= note: added definition (technically breaking)
2929

30-
error: aborting due to previous error
30+
error: aborting due to previous error; 2 warnings emitted
3131

tests/cases/bounds/stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ warning: technically breaking changes in `def`
3535
|
3636
= note: removed bound: `A: std::clone::Clone` (technically breaking)
3737

38-
error: aborting due to 2 previous errors
38+
error: aborting due to 2 previous errors; 2 warnings emitted
3939

tests/cases/consts/stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ warning: non-breaking changes in `E`
3131
|
3232
= note: static item made mutable (non-breaking)
3333

34-
error: aborting due to 3 previous errors
34+
error: aborting due to 3 previous errors; 1 warning emitted
3535

tests/cases/func/stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,5 @@ error: breaking changes in `ijk`
7575
|
7676
= warning: fn item made non-const (breaking)
7777

78-
error: aborting due to 6 previous errors
78+
error: aborting due to 6 previous errors; 2 warnings emitted
7979

tests/cases/inherent_impls/stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ warning: technically breaking changes in `def`
5555
|
5656
= note: added item in inherent impl (technically breaking)
5757

58-
error: aborting due to 4 previous errors
58+
error: aborting due to 4 previous errors; 2 warnings emitted
5959

tests/cases/macros/stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ warning: path changes to `quux2`
3939
|
4040
= note: added definition (technically breaking)
4141

42-
error: aborting due to 2 previous errors
42+
error: aborting due to 2 previous errors; 2 warnings emitted
4343

tests/cases/mix/stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ note: added path (technically breaking)
4444
10 | pub use self::a::Def;
4545
| ^^^^^^^^^^^^
4646

47-
error: aborting due to 3 previous errors
47+
error: aborting due to 3 previous errors; 1 warning emitted

tests/cases/pathologic_paths/stdout

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ warning: path changes to `b`
1515
|
1616
= note: added definition (technically breaking)
1717

18+
warning: 2 warnings emitted
19+

tests/cases/sealed_traits/stdout

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ note: added item to sealed trait (technically breaking)
1313
2 | fn abc(&self) -> bool;
1414
| ^^^^^^^^^^^^^^^^^^^^^^
1515

16+
warning: 1 warning emitted
17+

tests/cases/structs/stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ warning: tuple struct with no public fields changed to a regular struct (breakin
7979
28 | | }
8080
| |_^
8181

82-
error: aborting due to 4 previous errors
82+
error: aborting due to 4 previous errors; 2 warnings emitted
8383

tests/cases/trait_impls/stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ warning: technically breaking changes in `<std::cell::Cell<(bool, T)> as new::Ab
5151
|
5252
= note: trait impl generalized or newly added (technically breaking)
5353

54-
error: aborting due to 2 previous errors
54+
error: aborting due to 2 previous errors; 4 warnings emitted
5555

tests/cases/traits/stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,5 @@ error: breaking changes in `Tuv`
156156
|
157157
= warning: removed bound on trait definition: `A: std::clone::Clone` (breaking)
158158

159-
error: aborting due to 13 previous errors
159+
error: aborting due to 13 previous errors; 1 warning emitted
160160

tests/full_cases/libc-0.2.28-0.2.31.linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,6 @@ note: added path (technically breaking)
865865
284 | pub use unix::*;
866866
| ^^^^^^^
867867

868-
error: aborting due to 11 previous errors
868+
error: aborting due to 11 previous errors; 63 warnings emitted
869869

870870
error: rustc-semverver errored

tests/full_cases/libc-0.2.28-0.2.31.osx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2367,6 +2367,6 @@ note: added path (technically breaking)
23672367
284 | pub use unix::*;
23682368
| ^^^^^^^
23692369

2370-
error: aborting due to previous error
2370+
error: aborting due to previous error; 194 warnings emitted
23712371

23722372
error: rustc-semverver errored

tests/full_cases/log-0.3.4-0.3.8.linux

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ warning: technically breaking changes in `<new::LogRecord<'a> as std::fmt::Debug
2323
|
2424
= note: trait impl generalized or newly added (technically breaking)
2525

26-
warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Eq>`
26+
warning: technically breaking changes in `<new::LogMetadata<'a> as std::marker::StructuralEq>`
2727
--> log-0.3.8/src/lib.rs:552:10
2828
|
2929
552 | #[derive(Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
@@ -71,7 +71,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::fmt::Deb
7171
|
7272
= note: trait impl generalized or newly added (technically breaking)
7373

74-
warning: technically breaking changes in `<new::LogLocation as std::cmp::Eq>`
74+
warning: technically breaking changes in `<new::LogLocation as std::marker::StructuralEq>`
7575
--> log-0.3.8/src/lib.rs:604:30
7676
|
7777
604 | #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
@@ -157,3 +157,5 @@ warning: path changes to `ShutdownLoggerError`
157157
|
158158
= note: added definition (technically breaking)
159159

160+
warning: 18 warnings emitted
161+

tests/full_cases/log-0.3.4-0.3.8.osx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ warning: technically breaking changes in `<new::LogRecord<'a> as std::fmt::Debug
2323
|
2424
= note: trait impl generalized or newly added (technically breaking)
2525

26-
warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Eq>`
26+
warning: technically breaking changes in `<new::LogMetadata<'a> as std::marker::StructuralEq>`
2727
--> log-0.3.8/src/lib.rs:552:10
2828
|
2929
552 | #[derive(Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
@@ -71,7 +71,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::fmt::Deb
7171
|
7272
= note: trait impl generalized or newly added (technically breaking)
7373

74-
warning: technically breaking changes in `<new::LogLocation as std::cmp::Eq>`
74+
warning: technically breaking changes in `<new::LogLocation as std::marker::StructuralEq>`
7575
--> log-0.3.8/src/lib.rs:604:30
7676
|
7777
604 | #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
@@ -157,3 +157,5 @@ warning: path changes to `ShutdownLoggerError`
157157
|
158158
= note: added definition (technically breaking)
159159

160+
warning: 18 warnings emitted
161+

tests/full_cases/log-0.3.4-0.3.8.windows_msvc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,5 @@ warning: path changes to `ShutdownLoggerError`
157157
|
158158
= note: added definition (technically breaking)
159159

160+
warning: 18 warnings emitted
161+

tests/full_cases/rmpv-0.4.0-0.4.1.linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ warning: technically breaking changes in `<new::decode::Error as std::convert::F
106106
|
107107
= note: trait impl generalized or newly added (technically breaking)
108108

109-
error: aborting due to 4 previous errors
109+
error: aborting due to 4 previous errors; 4 warnings emitted
110110

111111
error: rustc-semverver errored

tests/full_cases/rmpv-0.4.0-0.4.1.osx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ warning: technically breaking changes in `<new::decode::Error as std::convert::F
106106
|
107107
= note: trait impl generalized or newly added (technically breaking)
108108

109-
error: aborting due to 4 previous errors
109+
error: aborting due to 4 previous errors; 4 warnings emitted
110110

111111
error: rustc-semverver errored

tests/full_cases/rmpv-0.4.0-0.4.1.windows_msvc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ warning: technically breaking changes in `<new::decode::Error as std::convert::F
106106
|
107107
= note: trait impl generalized or newly added (technically breaking)
108108

109-
error: aborting due to 4 previous errors
109+
error: aborting due to 4 previous errors; 4 warnings emitted
110110

111111
error: rustc-semverver errored

0 commit comments

Comments
 (0)