Skip to content

Commit a84a777

Browse files
committed
Bless the new .stderr output of compile fail tests
1 parent 8c3f97c commit a84a777

File tree

49 files changed

+1148
-402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1148
-402
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- uses: dtolnay/rust-toolchain@stable
4242
with:
4343
# Compile fail tests need std sources for the errors to display correctly
44-
components: rust-std
44+
components: rust-src
4545
- name: Install Linux dependencies
4646
uses: ./.github/actions/install-linux-deps
4747
- name: Build & run tests
@@ -66,7 +66,7 @@ jobs:
6666
key: ${{ runner.os }}-cargo-ci-${{ hashFiles('**/Cargo.toml') }}
6767
- uses: dtolnay/rust-toolchain@stable
6868
with:
69-
components: rustfmt, clippy
69+
components: rustfmt, clippy, rust-src
7070
- name: Install Linux dependencies
7171
uses: ./.github/actions/install-linux-deps
7272
with:
@@ -126,6 +126,8 @@ jobs:
126126
- uses: dtolnay/rust-toolchain@stable
127127
with:
128128
toolchain: stable
129+
# Compile fail tests need std sources for the errors to display correctly
130+
components: rust-src
129131
- name: Install Linux dependencies
130132
uses: ./.github/actions/install-linux-deps
131133
- name: Check Compile

crates/bevy_derive/compile_fail/tests/deref_derive/invalid_attribute_fail.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: unexpected token in attribute
2-
--> tests/deref_derive/invalid_attribute_fail.rs:8:12
3-
|
4-
8 | #[deref()] String
5-
| ^
2+
--> tests/deref_derive/invalid_attribute_fail.rs:LL:CC
3+
|
4+
LL | #[deref()] String
5+
| ^
66

77
error: unexpected token in attribute
8-
--> tests/deref_derive/invalid_attribute_fail.rs:15:12
8+
--> tests/deref_derive/invalid_attribute_fail.rs:LL:CC
99
|
10-
15 | #[deref()]
10+
LL | #[deref()]
1111
| ^
1212

1313
error: aborting due to 2 previous errors

crates/bevy_derive/compile_fail/tests/deref_derive/invalid_item_fail.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: Deref cannot be derived on field-less structs
2-
--> tests/deref_derive/invalid_item_fail.rs:3:10
3-
|
4-
3 | #[derive(Deref)]
5-
| ^^^^^
6-
|
2+
--> tests/deref_derive/invalid_item_fail.rs:LL:CC
3+
|
4+
LL | #[derive(Deref)]
5+
| ^^^^^
6+
|
77
= note: this error originates in the derive macro `Deref` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
error: Deref can only be derived on structs
10-
--> tests/deref_derive/invalid_item_fail.rs:7:10
11-
|
12-
7 | #[derive(Deref)]
13-
| ^^^^^
14-
|
10+
--> tests/deref_derive/invalid_item_fail.rs:LL:CC
11+
|
12+
LL | #[derive(Deref)]
13+
| ^^^^^
14+
|
1515
= note: this error originates in the derive macro `Deref` (in Nightly builds, run with -Z macro-backtrace for more info)
1616

1717
error: aborting due to 2 previous errors

crates/bevy_derive/compile_fail/tests/deref_derive/missing_attribute_fail.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: deriving Deref on multi-field structs requires one field to have the `#[deref]` attribute
2-
--> tests/deref_derive/missing_attribute_fail.rs:3:10
3-
|
4-
3 | #[derive(Deref)]
5-
| ^^^^^
6-
|
2+
--> tests/deref_derive/missing_attribute_fail.rs:LL:CC
3+
|
4+
LL | #[derive(Deref)]
5+
| ^^^^^
6+
|
77
= note: this error originates in the derive macro `Deref` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
error: deriving Deref on multi-field structs requires one field to have the `#[deref]` attribute
10-
--> tests/deref_derive/missing_attribute_fail.rs:7:10
11-
|
12-
7 | #[derive(Deref)]
13-
| ^^^^^
14-
|
10+
--> tests/deref_derive/missing_attribute_fail.rs:LL:CC
11+
|
12+
LL | #[derive(Deref)]
13+
| ^^^^^
14+
|
1515
= note: this error originates in the derive macro `Deref` (in Nightly builds, run with -Z macro-backtrace for more info)
1616

1717
error: aborting due to 2 previous errors

crates/bevy_derive/compile_fail/tests/deref_derive/multiple_attributes_fail.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: `#[deref]` attribute can only be used on a single field
2-
--> tests/deref_derive/multiple_attributes_fail.rs:6:5
3-
|
4-
6 | #[deref] String
5-
| ^^^^^^^^
2+
--> tests/deref_derive/multiple_attributes_fail.rs:LL:CC
3+
|
4+
LL | #[deref] String
5+
| ^^^^^^^^
66

77
error: `#[deref]` attribute can only be used on a single field
8-
--> tests/deref_derive/multiple_attributes_fail.rs:14:5
8+
--> tests/deref_derive/multiple_attributes_fail.rs:LL:CC
99
|
10-
14 | #[deref]
10+
LL | #[deref]
1111
| ^^^^^^^^
1212

1313
error: aborting due to 2 previous errors

crates/bevy_derive/compile_fail/tests/deref_mut_derive/invalid_attribute_fail.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: unexpected token in attribute
2-
--> tests/deref_mut_derive/invalid_attribute_fail.rs:9:12
3-
|
4-
9 | #[deref()] String
5-
| ^
2+
--> tests/deref_mut_derive/invalid_attribute_fail.rs:LL:CC
3+
|
4+
LL | #[deref()] String
5+
| ^
66

77
error: unexpected token in attribute
8-
--> tests/deref_mut_derive/invalid_attribute_fail.rs:24:12
8+
--> tests/deref_mut_derive/invalid_attribute_fail.rs:LL:CC
99
|
10-
24 | #[deref()]
10+
LL | #[deref()]
1111
| ^
1212

1313
error: aborting due to 2 previous errors

crates/bevy_derive/compile_fail/tests/deref_mut_derive/invalid_item_fail.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: DerefMut cannot be derived on field-less structs
2-
--> tests/deref_mut_derive/invalid_item_fail.rs:3:10
3-
|
4-
3 | #[derive(DerefMut)]
5-
| ^^^^^^^^
6-
|
2+
--> tests/deref_mut_derive/invalid_item_fail.rs:LL:CC
3+
|
4+
LL | #[derive(DerefMut)]
5+
| ^^^^^^^^
6+
|
77
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
error: DerefMut can only be derived on structs
10-
--> tests/deref_mut_derive/invalid_item_fail.rs:7:10
11-
|
12-
7 | #[derive(DerefMut)]
13-
| ^^^^^^^^
14-
|
10+
--> tests/deref_mut_derive/invalid_item_fail.rs:LL:CC
11+
|
12+
LL | #[derive(DerefMut)]
13+
| ^^^^^^^^
14+
|
1515
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)
1616

1717
error: aborting due to 2 previous errors

crates/bevy_derive/compile_fail/tests/deref_mut_derive/mismatched_target_type_fail.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
error[E0308]: mismatched types
2-
--> tests/deref_mut_derive/mismatched_target_type_fail.rs:4:10
3-
|
4-
4 | #[derive(DerefMut)]
5-
| ^^^^^^^^
6-
| |
7-
| expected `&mut String`, found `&mut usize`
8-
| expected `&mut String` because of return type
9-
|
2+
--> tests/deref_mut_derive/mismatched_target_type_fail.rs:LL:CC
3+
|
4+
LL | #[derive(DerefMut)]
5+
| ^^^^^^^^
6+
| |
7+
| expected `&mut String`, found `&mut usize`
8+
| expected `&mut String` because of return type
9+
|
1010
= note: expected mutable reference `&mut String`
1111
found mutable reference `&mut usize`
1212
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)
1313

1414
error[E0308]: mismatched types
15-
--> tests/deref_mut_derive/mismatched_target_type_fail.rs:16:10
15+
--> tests/deref_mut_derive/mismatched_target_type_fail.rs:LL:CC
1616
|
17-
16 | #[derive(DerefMut)]
17+
LL | #[derive(DerefMut)]
1818
| ^^^^^^^^
1919
| |
2020
| expected `&mut String`, found `&mut usize`

crates/bevy_derive/compile_fail/tests/deref_mut_derive/missing_attribute_fail.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
error: deriving DerefMut on multi-field structs requires one field to have the `#[deref]` attribute
2-
--> tests/deref_mut_derive/missing_attribute_fail.rs:4:10
3-
|
4-
4 | #[derive(DerefMut)]
5-
| ^^^^^^^^
6-
|
2+
--> tests/deref_mut_derive/missing_attribute_fail.rs:LL:CC
3+
|
4+
LL | #[derive(DerefMut)]
5+
| ^^^^^^^^
6+
|
77
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
error: deriving DerefMut on multi-field structs requires one field to have the `#[deref]` attribute
10-
--> tests/deref_mut_derive/missing_attribute_fail.rs:16:10
10+
--> tests/deref_mut_derive/missing_attribute_fail.rs:LL:CC
1111
|
12-
16 | #[derive(DerefMut)]
12+
LL | #[derive(DerefMut)]
1313
| ^^^^^^^^
1414
|
1515
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)

crates/bevy_derive/compile_fail/tests/deref_mut_derive/missing_deref_fail.stderr

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
error[E0277]: the trait bound `TupleStruct: Deref` is not satisfied
2-
--> tests/deref_mut_derive/missing_deref_fail.rs:10:8
3-
|
4-
10 | struct TupleStruct(usize, #[deref] String);
5-
| ^^^^^^^^^^^ the trait `Deref` is not implemented for `TupleStruct`
6-
|
2+
--> tests/deref_mut_derive/missing_deref_fail.rs:LL:CC
3+
|
4+
LL | struct TupleStruct(usize, #[deref] String);
5+
| ^^^^^^^^^^^ the trait `Deref` is not implemented for `TupleStruct`
6+
|
77
note: required by a bound in `DerefMut`
8-
--> $RUSTUP_HOME/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/library/core/src/ops/deref.rs:264:21
9-
|
10-
264 | pub trait DerefMut: Deref {
11-
| ^^^^^ required by this bound in `DerefMut`
8+
--> RUSTLIB/core/src/ops/deref.rs:LL:CC
9+
|
10+
LL | pub trait DerefMut: ~const Deref {
11+
| ^^^^^^^^^^^^ required by this bound in `DerefMut`
1212

1313
error[E0277]: the trait bound `TupleStruct: Deref` is not satisfied
14-
--> tests/deref_mut_derive/missing_deref_fail.rs:7:10
15-
|
16-
7 | #[derive(DerefMut)]
17-
| ^^^^^^^^ the trait `Deref` is not implemented for `TupleStruct`
18-
|
14+
--> tests/deref_mut_derive/missing_deref_fail.rs:LL:CC
15+
|
16+
LL | #[derive(DerefMut)]
17+
| ^^^^^^^^ the trait `Deref` is not implemented for `TupleStruct`
18+
|
1919
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)
2020

2121
error[E0277]: the trait bound `Struct: Deref` is not satisfied
22-
--> tests/deref_mut_derive/missing_deref_fail.rs:15:8
23-
|
24-
15 | struct Struct {
25-
| ^^^^^^ the trait `Deref` is not implemented for `Struct`
26-
|
22+
--> tests/deref_mut_derive/missing_deref_fail.rs:LL:CC
23+
|
24+
LL | struct Struct {
25+
| ^^^^^^ the trait `Deref` is not implemented for `Struct`
26+
|
2727
note: required by a bound in `DerefMut`
28-
--> $RUSTUP_HOME/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/library/core/src/ops/deref.rs:264:21
29-
|
30-
264 | pub trait DerefMut: Deref {
31-
| ^^^^^ required by this bound in `DerefMut`
28+
--> RUSTLIB/core/src/ops/deref.rs:LL:CC
29+
|
30+
LL | pub trait DerefMut: ~const Deref {
31+
| ^^^^^^^^^^^^ required by this bound in `DerefMut`
3232

3333
error[E0277]: the trait bound `Struct: Deref` is not satisfied
34-
--> tests/deref_mut_derive/missing_deref_fail.rs:13:10
34+
--> tests/deref_mut_derive/missing_deref_fail.rs:LL:CC
3535
|
36-
13 | #[derive(DerefMut)]
36+
LL | #[derive(DerefMut)]
3737
| ^^^^^^^^ the trait `Deref` is not implemented for `Struct`
3838
|
3939
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)

crates/bevy_derive/compile_fail/tests/deref_mut_derive/multiple_attributes_fail.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: `#[deref]` attribute can only be used on a single field
2-
--> tests/deref_mut_derive/multiple_attributes_fail.rs:7:5
3-
|
4-
7 | #[deref] String
5-
| ^^^^^^^^
2+
--> tests/deref_mut_derive/multiple_attributes_fail.rs:LL:CC
3+
|
4+
LL | #[deref] String
5+
| ^^^^^^^^
66

77
error: `#[deref]` attribute can only be used on a single field
8-
--> tests/deref_mut_derive/multiple_attributes_fail.rs:23:5
8+
--> tests/deref_mut_derive/multiple_attributes_fail.rs:LL:CC
99
|
10-
23 | #[deref]
10+
LL | #[deref]
1111
| ^^^^^^^^
1212

1313
error: aborting due to 2 previous errors

0 commit comments

Comments
 (0)