Skip to content

Commit 5215d9e

Browse files
committed
Signed-off-by: Yuki Okushi <[email protected]>
1 parent 63bbfbe commit 5215d9e

33 files changed

+578
-1454
lines changed

README.md

+5-5
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-2022-06-20` toolchain.
31-
You can install it by using `rustup install nightly-2022-06-20` if you already have rustup.
30+
It's recommended to use `nightly-2022-07-16` toolchain.
31+
You can install it by using `rustup install nightly-2022-07-16` if you already have rustup.
3232
Then you can do:
3333

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

123123
```sh
124124
# install a current version of rust-semverver
125-
cargo +nightly-2022-06-20 install --git https://github.com/rust-lang/rust-semverver
125+
cargo +nightly-2022-07-16 install --git https://github.com/rust-lang/rust-semverver
126126
# fetch the version in the manifest of your crate (adapt this to your usecase if needed)
127127
eval "current_version=$(grep -e '^version = .*$' Cargo.toml | cut -d ' ' -f 3)"
128128
# run the semver checks and output them for convenience

rust-toolchain

+1-1
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-2022-06-20"
3+
channel = "nightly-2022-07-16"
44
components = ["llvm-tools-preview", "rustc-dev"]

src/typeck.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,10 @@ impl<'a, 'tcx> TypeComparisonContext<'a, 'tcx> {
248248
// self.relate_regions(r_b, r_a);
249249
// }
250250

251-
self.infcx
252-
.resolve_regions_and_report_errors(target_def_id, &outlives_env);
251+
if let Some(local_did) = target_def_id.as_local() {
252+
self.infcx
253+
.resolve_regions_and_report_errors(local_did, &outlives_env);
254+
}
253255

254256
let err = self
255257
.infcx

tests/cases/addition/stdout

+13-20
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,47 @@ warning: technically breaking changes in `Bcd`
33
--> addition/new.rs:3:1
44
|
55
3 | pub struct Bcd;
6-
| ^^^^^^^^^^^^^^^
6+
| ^^^^^^^^^^^^^^
77
|
88
= note: item made public (technically breaking)
99

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

2118
warning: technically breaking changes in `d`
2219
--> addition/new.rs:19:1
2320
|
24-
19 | / pub mod d {
25-
20 | |
26-
21 | | }
27-
| |_^
21+
19 | pub mod d {
22+
| ^^^^^^^^^
2823
|
2924
= note: item made public (technically breaking)
3025

3126
warning: path changes to `Abc`
3227
--> addition/new.rs:1:1
3328
|
3429
1 | pub struct Abc;
35-
| ^^^^^^^^^^^^^^^
30+
| ^^^^^^^^^^^^^^
3631
|
3732
= note: added definition (technically breaking)
3833

3934
warning: path changes to `a`
4035
--> addition/new.rs:5:1
4136
|
42-
5 | / pub mod a {
43-
6 | |
44-
7 | | }
45-
| |_^
37+
5 | pub mod a {
38+
| ^^^^^^^^^
4639
|
4740
= note: added definition (technically breaking)
4841

4942
warning: path changes to `Cde`
5043
--> addition/new.rs:11:5
5144
|
5245
11 | pub struct Cde;
53-
| ^^^^^^^^^^^^^^^
46+
| ^^^^^^^^^^^^^^
5447
|
5548
= note: added definition (technically breaking)
5649

tests/cases/addition_path/stdout

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ warning: path changes to `Abc`
33
--> addition_path/new.rs:2:5
44
|
55
2 | pub struct Abc;
6-
| ^^^^^^^^^^^^^^^
6+
| ^^^^^^^^^^^^^^
77
|
88
note: added path (technically breaking)
99
--> addition_path/new.rs:6:13
@@ -24,10 +24,8 @@ note: added path (technically breaking)
2424
warning: path changes to `d`
2525
--> addition_path/new.rs:15:1
2626
|
27-
15 | / pub mod d {
28-
16 | |
29-
17 | | }
30-
| |_^
27+
15 | pub mod d {
28+
| ^^^^^^^^^
3129
|
3230
= note: added definition (technically breaking)
3331

tests/cases/addition_use/stdout

+4-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ version bump: 1.0.0 -> (breaking) -> 2.0.0
22
error: breaking changes in `Def`
33
--> addition_use/new.rs:5:1
44
|
5-
5 | / pub struct Def<'a> {
6-
6 | | pub field1: Abc,
7-
7 | | pub field2: &'a dyn Bcd,
8-
8 | | }
9-
| |_^
5+
5 | pub struct Def<'a> {
6+
| ^^^^^^^^^^^^^^^^^^
107
|
118
= warning: type error: expected `()`, found struct `new::Abc` (breaking)
129
= warning: type error: expected `()`, found trait object `dyn new::Bcd` (breaking)
@@ -15,15 +12,15 @@ warning: path changes to `Abc`
1512
--> addition_use/new.rs:1:1
1613
|
1714
1 | pub struct Abc;
18-
| ^^^^^^^^^^^^^^^
15+
| ^^^^^^^^^^^^^^
1916
|
2017
= note: added definition (technically breaking)
2118

2219
warning: path changes to `Bcd`
2320
--> addition_use/new.rs:3:1
2421
|
2522
3 | pub trait Bcd {}
26-
| ^^^^^^^^^^^^^^^^
23+
| ^^^^^^^^^^^^^
2724
|
2825
= note: added definition (technically breaking)
2926

tests/cases/addition_use/stdout_api_guidelines

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ version bump: 1.0.0 -> (breaking) -> 2.0.0
22
error: breaking changes in `Def`
33
--> addition_use/new.rs:5:1
44
|
5-
5 | / pub struct Def<'a> {
6-
6 | | pub field1: Abc,
7-
7 | | pub field2: &'a dyn Bcd,
8-
8 | | }
9-
| |_^
5+
5 | pub struct Def<'a> {
6+
| ^^^^^^^^^^^^^^^^^^
107
|
118
= warning: type error: expected `()`, found struct `new::Abc` (breaking)
129
= warning: type error: expected `()`, found trait object `dyn new::Bcd` (breaking)

tests/cases/bounds/stdout

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@ version bump: 1.0.0 -> (breaking) -> 2.0.0
22
error: breaking changes in `Abc`
33
--> bounds/new.rs:1:1
44
|
5-
1 | / pub struct Abc<A: Clone> {
6-
2 | | pub a: A,
7-
3 | | }
8-
| |_^
5+
1 | pub struct Abc<A: Clone> {
6+
| ^^^^^^^^^^^^^^^^^^^^^^^^
97
|
108
= warning: added bound: `A: std::clone::Clone` (breaking)
119

1210
warning: technically breaking changes in `Def`
1311
--> bounds/new.rs:5:1
1412
|
15-
5 | / pub struct Def<A> {
16-
6 | | pub d: A,
17-
7 | | }
18-
| |_^
13+
5 | pub struct Def<A> {
14+
| ^^^^^^^^^^^^^^^^^
1915
|
2016
= note: removed bound: `A: std::clone::Clone` (technically breaking)
2117

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

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

tests/cases/consts/stdout

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ error: breaking changes in `A`
33
--> consts/new.rs:1:1
44
|
55
1 | pub const A: u16 = 0;
6-
| ^^^^^^^^^^^^^^^^^^^^^
6+
| ^^^^^^^^^^^^^^^^
77
|
88
= warning: type error: expected `u8`, found `u16` (breaking)
99

1010
error: breaking changes in `B`
1111
--> consts/new.rs:3:1
1212
|
1313
3 | pub static B: u16 = 1;
14-
| ^^^^^^^^^^^^^^^^^^^^^^
14+
| ^^^^^^^^^^^^^^^^^
1515
|
1616
= warning: type error: expected `u8`, found `u16` (breaking)
1717

1818
error: breaking changes in `D`
1919
--> consts/new.rs:7:1
2020
|
2121
7 | pub static D: bool = true;
22-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
22+
| ^^^^^^^^^^^^^^^^^^
2323
|
2424
= warning: static item made immutable (breaking)
2525

2626
warning: non-breaking changes in `E`
2727
--> consts/new.rs:9:1
2828
|
2929
9 | pub static mut E: bool = true;
30-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
| ^^^^^^^^^^^^^^^^^^^^^^
3131
|
3232
= note: static item made mutable (non-breaking)
3333

tests/cases/enums/stdout

+13-28
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ version bump: 1.0.0 -> (breaking) -> 2.0.0
22
error: breaking changes in `Abc`
33
--> enums/new.rs:1:1
44
|
5-
1 | / pub enum Abc {
6-
2 | | Abc,
7-
3 | | }
8-
| |_^
5+
1 | pub enum Abc {
6+
| ^^^^^^^^^^^^
97
|
108
warning: enum variant added (breaking)
119
--> enums/new.rs:2:5
@@ -16,10 +14,8 @@ warning: enum variant added (breaking)
1614
error: breaking changes in `Bcd`
1715
--> enums/new.rs:5:1
1816
|
19-
5 | / pub enum Bcd {
20-
6 | |
21-
7 | | }
22-
| |_^
17+
5 | pub enum Bcd {
18+
| ^^^^^^^^^^^^
2319
|
2420
warning: enum variant removed (breaking)
2521
--> enums/old.rs:6:5
@@ -30,11 +26,8 @@ warning: enum variant removed (breaking)
3026
error: breaking changes in `Cde`
3127
--> enums/new.rs:9:1
3228
|
33-
9 | / pub enum Cde {
34-
10 | | Abc,
35-
11 | | Bcd,
36-
12 | | }
37-
| |_^
29+
9 | pub enum Cde {
30+
| ^^^^^^^^^^^^
3831
|
3932
warning: enum variant added (breaking)
4033
--> enums/new.rs:11:5
@@ -45,10 +38,8 @@ warning: enum variant added (breaking)
4538
error: breaking changes in `Def`
4639
--> enums/new.rs:14:1
4740
|
48-
14 | / pub enum Def {
49-
15 | | Abc,
50-
16 | | }
51-
| |_^
41+
14 | pub enum Def {
42+
| ^^^^^^^^^^^^
5243
|
5344
warning: enum variant removed (breaking)
5445
--> enums/old.rs:15:5
@@ -59,20 +50,14 @@ warning: enum variant removed (breaking)
5950
error: breaking changes in `Efg`
6051
--> enums/new.rs:18:1
6152
|
62-
18 | / pub enum Efg {
63-
19 | | Abc(u8),
64-
20 | | Bcd,
65-
21 | | Cde { f: u8 },
66-
... |
67-
25 | | Ghi { g: u8 },
68-
26 | | }
69-
| |_^
53+
18 | pub enum Efg {
54+
| ^^^^^^^^^^^^
7055
|
7156
warning: variant with no public fields changed to a tuple variant (breaking)
7257
--> enums/new.rs:19:5
7358
|
7459
19 | Abc(u8),
75-
| ^^^^^^^
60+
| ^^^
7661
warning: variant with public fields changed to a tuple variant (breaking)
7762
--> enums/new.rs:20:5
7863
|
@@ -82,7 +67,7 @@ warning: variant with public fields changed to a struct variant (breaking)
8267
--> enums/new.rs:21:5
8368
|
8469
21 | Cde { f: u8 },
85-
| ^^^^^^^^^^^^^
70+
| ^^^
8671
warning: variant with public fields changed to a tuple variant (breaking)
8772
--> enums/new.rs:22:5
8873
|
@@ -92,7 +77,7 @@ warning: variant with public fields changed to a struct variant (breaking)
9277
--> enums/new.rs:23:5
9378
|
9479
23 | Efg { f: u8 },
95-
| ^^^^^^^^^^^^^
80+
| ^^^
9681
warning: public field removed from variant with no private fields (breaking)
9782
--> enums/old.rs:25:11
9883
|

tests/cases/infer_regress/stdout

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ error: breaking changes in `Abc`
1212
--> infer_regress/new.rs:3:1
1313
|
1414
3 | pub struct Abc<A>(pub A, pub ());
15-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15+
| ^^^^^^^^^^^^^^^^^
1616
|
1717
= warning: type error: expected type parameter `A`, found `()` (breaking)
1818

19-
error: aborting due to 2 previous errors
19+
error: aborting due to 2 previous errors
20+

tests/cases/kind_change/stdout

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ version bump: 1.0.0 -> (breaking) -> 2.0.0
22
error: breaking changes in `Abc`
33
--> kind_change/new.rs:1:1
44
|
5-
1 | / pub enum Abc {
6-
2 | |
7-
3 | | }
8-
| |_^
5+
1 | pub enum Abc {
6+
| ^^^^^^^^^^^^
97
|
108
= warning: item kind changed (breaking)
119

0 commit comments

Comments
 (0)