Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
  • Loading branch information
JohnTitor committed Jul 16, 2022
1 parent 63bbfbe commit 8d2148d
Show file tree
Hide file tree
Showing 33 changed files with 578 additions and 1,454 deletions.
10 changes: 5 additions & 5 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-2022-06-20` toolchain.
You can install it by using `rustup install nightly-2022-06-20` if you already have rustup.
It's recommended to use `nightly-2022-07-16` toolchain.
You can install it by using `rustup install nightly-2022-07-16` if you already have rustup.
Then you can do:

```sh
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2022-06-20
$ cargo +nightly-2022-06-20 install --git https://github.com/rust-lang/rust-semverver
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2022-07-16
$ cargo +nightly-2022-07-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 Expand Up @@ -122,7 +122,7 @@ carried out correctly with regards to the current version of your crate on crate

```sh
# install a current version of rust-semverver
cargo +nightly-2022-06-20 install --git https://github.com/rust-lang/rust-semverver
cargo +nightly-2022-07-16 install --git https://github.com/rust-lang/rust-semverver
# fetch the version in the manifest of your crate (adapt this to your usecase if needed)
eval "current_version=$(grep -e '^version = .*$' Cargo.toml | cut -d ' ' -f 3)"
# run the semver checks and output them for convenience
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-2022-06-20"
channel = "nightly-2022-07-16"
components = ["llvm-tools-preview", "rustc-dev"]
6 changes: 4 additions & 2 deletions src/typeck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,10 @@ impl<'a, 'tcx> TypeComparisonContext<'a, 'tcx> {
// self.relate_regions(r_b, r_a);
// }

self.infcx
.resolve_regions_and_report_errors(target_def_id, &outlives_env);
if let Some(local_did) = target_def_id.as_local() {
self.infcx
.resolve_regions_and_report_errors(local_did, &outlives_env);
}

let err = self
.infcx
Expand Down
33 changes: 13 additions & 20 deletions tests/cases/addition/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,47 @@ warning: technically breaking changes in `Bcd`
--> addition/new.rs:3:1
|
3 | pub struct Bcd;
| ^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^
|
= note: item made public (technically breaking)

warning: technically breaking changes in `b`
--> addition/new.rs:9:1
|
9 | / pub mod b {
10 | | #[allow(dead_code)]
11 | | pub struct Cde;
12 | | }
| |_^
|
= note: item made public (technically breaking)
--> addition/new.rs:9:1
|
9 | pub mod b {
| ^^^^^^^^^
|
= note: item made public (technically breaking)

warning: technically breaking changes in `d`
--> addition/new.rs:19:1
|
19 | / pub mod d {
20 | |
21 | | }
| |_^
19 | pub mod d {
| ^^^^^^^^^
|
= note: item made public (technically breaking)

warning: path changes to `Abc`
--> addition/new.rs:1:1
|
1 | pub struct Abc;
| ^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

warning: path changes to `a`
--> addition/new.rs:5:1
|
5 | / pub mod a {
6 | |
7 | | }
| |_^
5 | pub mod a {
| ^^^^^^^^^
|
= note: added definition (technically breaking)

warning: path changes to `Cde`
--> addition/new.rs:11:5
|
11 | pub struct Cde;
| ^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

Expand Down
8 changes: 3 additions & 5 deletions tests/cases/addition_path/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ warning: path changes to `Abc`
--> addition_path/new.rs:2:5
|
2 | pub struct Abc;
| ^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^
|
note: added path (technically breaking)
--> addition_path/new.rs:6:13
Expand All @@ -24,10 +24,8 @@ note: added path (technically breaking)
warning: path changes to `d`
--> addition_path/new.rs:15:1
|
15 | / pub mod d {
16 | |
17 | | }
| |_^
15 | pub mod d {
| ^^^^^^^^^
|
= note: added definition (technically breaking)

Expand Down
11 changes: 4 additions & 7 deletions tests/cases/addition_use/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ version bump: 1.0.0 -> (breaking) -> 2.0.0
error: breaking changes in `Def`
--> addition_use/new.rs:5:1
|
5 | / pub struct Def<'a> {
6 | | pub field1: Abc,
7 | | pub field2: &'a dyn Bcd,
8 | | }
| |_^
5 | pub struct Def<'a> {
| ^^^^^^^^^^^^^^^^^^
|
= warning: type error: expected `()`, found struct `new::Abc` (breaking)
= warning: type error: expected `()`, found trait object `dyn new::Bcd` (breaking)
Expand All @@ -15,15 +12,15 @@ warning: path changes to `Abc`
--> addition_use/new.rs:1:1
|
1 | pub struct Abc;
| ^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

warning: path changes to `Bcd`
--> addition_use/new.rs:3:1
|
3 | pub trait Bcd {}
| ^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

Expand Down
7 changes: 2 additions & 5 deletions tests/cases/addition_use/stdout_api_guidelines
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ version bump: 1.0.0 -> (breaking) -> 2.0.0
error: breaking changes in `Def`
--> addition_use/new.rs:5:1
|
5 | / pub struct Def<'a> {
6 | | pub field1: Abc,
7 | | pub field2: &'a dyn Bcd,
8 | | }
| |_^
5 | pub struct Def<'a> {
| ^^^^^^^^^^^^^^^^^^
|
= warning: type error: expected `()`, found struct `new::Abc` (breaking)
= warning: type error: expected `()`, found trait object `dyn new::Bcd` (breaking)
Expand Down
15 changes: 6 additions & 9 deletions tests/cases/bounds/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@ version bump: 1.0.0 -> (breaking) -> 2.0.0
error: breaking changes in `Abc`
--> bounds/new.rs:1:1
|
1 | / pub struct Abc<A: Clone> {
2 | | pub a: A,
3 | | }
| |_^
1 | pub struct Abc<A: Clone> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: added bound: `A: std::clone::Clone` (breaking)

warning: technically breaking changes in `Def`
--> bounds/new.rs:5:1
|
5 | / pub struct Def<A> {
6 | | pub d: A,
7 | | }
| |_^
5 | pub struct Def<A> {
| ^^^^^^^^^^^^^^^^^
|
= note: removed bound: `A: std::clone::Clone` (technically breaking)

Expand All @@ -35,4 +31,5 @@ warning: technically breaking changes in `def`
|
= note: removed bound: `A: std::clone::Clone` (technically breaking)

error: aborting due to 2 previous errors; 2 warnings emitted
error: aborting due to 2 previous errors; 2 warnings emitted

8 changes: 4 additions & 4 deletions tests/cases/consts/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ error: breaking changes in `A`
--> consts/new.rs:1:1
|
1 | pub const A: u16 = 0;
| ^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^
|
= warning: type error: expected `u8`, found `u16` (breaking)

error: breaking changes in `B`
--> consts/new.rs:3:1
|
3 | pub static B: u16 = 1;
| ^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^
|
= warning: type error: expected `u8`, found `u16` (breaking)

error: breaking changes in `D`
--> consts/new.rs:7:1
|
7 | pub static D: bool = true;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^
|
= warning: static item made immutable (breaking)

warning: non-breaking changes in `E`
--> consts/new.rs:9:1
|
9 | pub static mut E: bool = true;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: static item made mutable (non-breaking)

Expand Down
41 changes: 13 additions & 28 deletions tests/cases/enums/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ version bump: 1.0.0 -> (breaking) -> 2.0.0
error: breaking changes in `Abc`
--> enums/new.rs:1:1
|
1 | / pub enum Abc {
2 | | Abc,
3 | | }
| |_^
1 | pub enum Abc {
| ^^^^^^^^^^^^
|
warning: enum variant added (breaking)
--> enums/new.rs:2:5
Expand All @@ -16,10 +14,8 @@ warning: enum variant added (breaking)
error: breaking changes in `Bcd`
--> enums/new.rs:5:1
|
5 | / pub enum Bcd {
6 | |
7 | | }
| |_^
5 | pub enum Bcd {
| ^^^^^^^^^^^^
|
warning: enum variant removed (breaking)
--> enums/old.rs:6:5
Expand All @@ -30,11 +26,8 @@ warning: enum variant removed (breaking)
error: breaking changes in `Cde`
--> enums/new.rs:9:1
|
9 | / pub enum Cde {
10 | | Abc,
11 | | Bcd,
12 | | }
| |_^
9 | pub enum Cde {
| ^^^^^^^^^^^^
|
warning: enum variant added (breaking)
--> enums/new.rs:11:5
Expand All @@ -45,10 +38,8 @@ warning: enum variant added (breaking)
error: breaking changes in `Def`
--> enums/new.rs:14:1
|
14 | / pub enum Def {
15 | | Abc,
16 | | }
| |_^
14 | pub enum Def {
| ^^^^^^^^^^^^
|
warning: enum variant removed (breaking)
--> enums/old.rs:15:5
Expand All @@ -59,20 +50,14 @@ warning: enum variant removed (breaking)
error: breaking changes in `Efg`
--> enums/new.rs:18:1
|
18 | / pub enum Efg {
19 | | Abc(u8),
20 | | Bcd,
21 | | Cde { f: u8 },
... |
25 | | Ghi { g: u8 },
26 | | }
| |_^
18 | pub enum Efg {
| ^^^^^^^^^^^^
|
warning: variant with no public fields changed to a tuple variant (breaking)
--> enums/new.rs:19:5
|
19 | Abc(u8),
| ^^^^^^^
| ^^^
warning: variant with public fields changed to a tuple variant (breaking)
--> enums/new.rs:20:5
|
Expand All @@ -82,7 +67,7 @@ warning: variant with public fields changed to a struct variant (breaking)
--> enums/new.rs:21:5
|
21 | Cde { f: u8 },
| ^^^^^^^^^^^^^
| ^^^
warning: variant with public fields changed to a tuple variant (breaking)
--> enums/new.rs:22:5
|
Expand All @@ -92,7 +77,7 @@ warning: variant with public fields changed to a struct variant (breaking)
--> enums/new.rs:23:5
|
23 | Efg { f: u8 },
| ^^^^^^^^^^^^^
| ^^^
warning: public field removed from variant with no private fields (breaking)
--> enums/old.rs:25:11
|
Expand Down
5 changes: 3 additions & 2 deletions tests/cases/infer_regress/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ error: breaking changes in `Abc`
--> infer_regress/new.rs:3:1
|
3 | pub struct Abc<A>(pub A, pub ());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^
|
= warning: type error: expected type parameter `A`, found `()` (breaking)

error: aborting due to 2 previous errors
error: aborting due to 2 previous errors

6 changes: 2 additions & 4 deletions tests/cases/kind_change/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ version bump: 1.0.0 -> (breaking) -> 2.0.0
error: breaking changes in `Abc`
--> kind_change/new.rs:1:1
|
1 | / pub enum Abc {
2 | |
3 | | }
| |_^
1 | pub enum Abc {
| ^^^^^^^^^^^^
|
= warning: item kind changed (breaking)

Expand Down
Loading

0 comments on commit 8d2148d

Please sign in to comment.