Skip to content

Commit 51a6d03

Browse files
committed
Bless the new .stderr output of compile fail tests
1 parent 8778220 commit 51a6d03

File tree

42 files changed

+952
-197
lines changed

Some content is hidden

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

42 files changed

+952
-197
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: unexpected token in attribute
2-
--> tests/deref_derive/invalid_attribute_fail.rs:8:12
2+
--> tests/deref_derive/invalid_attribute_fail.rs:LL:CC
33
|
44
8 | #[deref()] String
55
| ^
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
|
1010
15 | #[deref()]
1111
| ^

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: Deref cannot be derived on field-less structs
2-
--> tests/deref_derive/invalid_item_fail.rs:3:10
2+
--> tests/deref_derive/invalid_item_fail.rs:LL:CC
33
|
44
3 | #[derive(Deref)]
55
| ^^^^^
66
|
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
10+
--> tests/deref_derive/invalid_item_fail.rs:LL:CC
1111
|
1212
7 | #[derive(Deref)]
1313
| ^^^^^

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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
2+
--> tests/deref_derive/missing_attribute_fail.rs:LL:CC
33
|
44
3 | #[derive(Deref)]
55
| ^^^^^
66
|
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
10+
--> tests/deref_derive/missing_attribute_fail.rs:LL:CC
1111
|
1212
7 | #[derive(Deref)]
1313
| ^^^^^

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: `#[deref]` attribute can only be used on a single field
2-
--> tests/deref_derive/multiple_attributes_fail.rs:6:5
2+
--> tests/deref_derive/multiple_attributes_fail.rs:LL:CC
33
|
44
6 | #[deref] String
55
| ^^^^^^^^
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
|
1010
14 | #[deref]
1111
| ^^^^^^^^

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: unexpected token in attribute
2-
--> tests/deref_mut_derive/invalid_attribute_fail.rs:9:12
2+
--> tests/deref_mut_derive/invalid_attribute_fail.rs:LL:CC
33
|
44
9 | #[deref()] String
55
| ^
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
|
1010
24 | #[deref()]
1111
| ^

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: DerefMut cannot be derived on field-less structs
2-
--> tests/deref_mut_derive/invalid_item_fail.rs:3:10
2+
--> tests/deref_mut_derive/invalid_item_fail.rs:LL:CC
33
|
44
3 | #[derive(DerefMut)]
55
| ^^^^^^^^
66
|
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
10+
--> tests/deref_mut_derive/invalid_item_fail.rs:LL:CC
1111
|
1212
7 | #[derive(DerefMut)]
1313
| ^^^^^^^^

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> tests/deref_mut_derive/mismatched_target_type_fail.rs:4:10
2+
--> tests/deref_mut_derive/mismatched_target_type_fail.rs:LL:CC
33
|
44
4 | #[derive(DerefMut)]
55
| ^^^^^^^^
@@ -12,7 +12,7 @@ error[E0308]: mismatched types
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
|
1717
16 | #[derive(DerefMut)]
1818
| ^^^^^^^^

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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
2+
--> tests/deref_mut_derive/missing_attribute_fail.rs:LL:CC
33
|
44
4 | #[derive(DerefMut)]
55
| ^^^^^^^^
66
|
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
|
1212
16 | #[derive(DerefMut)]
1313
| ^^^^^^^^

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

Lines changed: 13 additions & 13 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
2+
--> tests/deref_mut_derive/missing_deref_fail.rs:LL:CC
33
|
4-
10 | struct TupleStruct(usize, #[deref] String);
4+
9 | struct TupleStruct(usize, #[deref] String);
55
| ^^^^^^^^^^^ the trait `Deref` is not implemented for `TupleStruct`
66
|
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
8+
--> RUSTLIB/core/src/ops/deref.rs:LL:CC
99
|
10-
264 | pub trait DerefMut: Deref {
11-
| ^^^^^ required by this bound in `DerefMut`
10+
290 | 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
14+
--> tests/deref_mut_derive/missing_deref_fail.rs:LL:CC
1515
|
1616
7 | #[derive(DerefMut)]
1717
| ^^^^^^^^ the trait `Deref` is not implemented for `TupleStruct`
1818
|
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
22+
--> tests/deref_mut_derive/missing_deref_fail.rs:LL:CC
2323
|
24-
15 | struct Struct {
24+
14 | struct Struct {
2525
| ^^^^^^ the trait `Deref` is not implemented for `Struct`
2626
|
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
28+
--> RUSTLIB/core/src/ops/deref.rs:LL:CC
2929
|
30-
264 | pub trait DerefMut: Deref {
31-
| ^^^^^ required by this bound in `DerefMut`
30+
290 | 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+
12 | #[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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: `#[deref]` attribute can only be used on a single field
2-
--> tests/deref_mut_derive/multiple_attributes_fail.rs:7:5
2+
--> tests/deref_mut_derive/multiple_attributes_fail.rs:LL:CC
33
|
44
7 | #[deref] String
55
| ^^^^^^^^
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
|
1010
23 | #[deref]
1111
| ^^^^^^^^

crates/bevy_ecs/compile_fail/tests/ui/entity_ref_mut_lifetime_safety.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0502]: cannot borrow `e_mut` as mutable because it is also borrowed as immutable
2-
--> tests/ui/entity_ref_mut_lifetime_safety.rs:17:26
2+
--> tests/ui/entity_ref_mut_lifetime_safety.rs:LL:CC
33
|
44
16 | let gotten: &A = e_mut.get::<A>().unwrap();
55
| ----- immutable borrow occurs here
@@ -10,7 +10,7 @@ error[E0502]: cannot borrow `e_mut` as mutable because it is also borrowed as im
1010
| ---------------------------- immutable borrow later used here
1111

1212
error[E0499]: cannot borrow `e_mut` as mutable more than once at a time
13-
--> tests/ui/entity_ref_mut_lifetime_safety.rs:26:30
13+
--> tests/ui/entity_ref_mut_lifetime_safety.rs:LL:CC
1414
|
1515
25 | let mut gotten: Mut<A> = e_mut.get_mut::<A>().unwrap();
1616
| ----- first mutable borrow occurs here
@@ -21,7 +21,7 @@ error[E0499]: cannot borrow `e_mut` as mutable more than once at a time
2121
| ------ first borrow later used here
2222

2323
error[E0505]: cannot move out of `e_mut` because it is borrowed
24-
--> tests/ui/entity_ref_mut_lifetime_safety.rs:35:9
24+
--> tests/ui/entity_ref_mut_lifetime_safety.rs:LL:CC
2525
|
2626
13 | let mut e_mut = world.entity_mut(e);
2727
| --------- binding `e_mut` declared here
@@ -35,7 +35,7 @@ error[E0505]: cannot move out of `e_mut` because it is borrowed
3535
| ------------------------------------------ borrow later used here
3636

3737
error[E0502]: cannot borrow `e_mut` as mutable because it is also borrowed as immutable
38-
--> tests/ui/entity_ref_mut_lifetime_safety.rs:45:34
38+
--> tests/ui/entity_ref_mut_lifetime_safety.rs:LL:CC
3939
|
4040
44 | let gotten: &A = e_mut.get::<A>().unwrap();
4141
| ----- immutable borrow occurs here
@@ -46,7 +46,7 @@ error[E0502]: cannot borrow `e_mut` as mutable because it is also borrowed as im
4646
| -------------------------------- immutable borrow later used here
4747

4848
error[E0502]: cannot borrow `e_mut` as immutable because it is also borrowed as mutable
49-
--> tests/ui/entity_ref_mut_lifetime_safety.rs:52:26
49+
--> tests/ui/entity_ref_mut_lifetime_safety.rs:LL:CC
5050
|
5151
51 | let gotten_mut: Mut<A> = e_mut.get_mut::<A>().unwrap();
5252
| ----- mutable borrow occurs here
@@ -57,7 +57,7 @@ error[E0502]: cannot borrow `e_mut` as immutable because it is also borrowed as
5757
| ---------- mutable borrow later used here
5858

5959
error[E0502]: cannot borrow `e_mut` as mutable because it is also borrowed as immutable
60-
--> tests/ui/entity_ref_mut_lifetime_safety.rs:59:9
60+
--> tests/ui/entity_ref_mut_lifetime_safety.rs:LL:CC
6161
|
6262
58 | let gotten: &A = e_mut.get::<A>().unwrap();
6363
| ----- immutable borrow occurs here
@@ -68,7 +68,7 @@ error[E0502]: cannot borrow `e_mut` as mutable because it is also borrowed as im
6868
| ------------------------------------------ immutable borrow later used here
6969

7070
error[E0499]: cannot borrow `e_mut` as mutable more than once at a time
71-
--> tests/ui/entity_ref_mut_lifetime_safety.rs:67:9
71+
--> tests/ui/entity_ref_mut_lifetime_safety.rs:LL:CC
7272
|
7373
66 | let mut gotten_mut: Mut<A> = e_mut.get_mut::<A>().unwrap();
7474
| ----- first mutable borrow occurs here

crates/bevy_ecs/compile_fail/tests/ui/query_exact_sized_iterator_safety.stderr

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,53 @@
1-
error[E0277]: the trait bound `bevy_ecs::query::Changed<Foo>: ArchetypeFilter` is not satisfied
2-
--> tests/ui/query_exact_sized_iterator_safety.rs:7:28
1+
error[E0277]: `bevy_ecs::query::Changed<Foo>` is not a valid `Query` filter based on archetype information
2+
--> tests/ui/query_exact_sized_iterator_safety.rs:LL:CC
33
|
44
7 | is_exact_size_iterator(query.iter());
5-
| ---------------------- ^^^^^^^^^^^^ the trait `ArchetypeFilter` is not implemented for `bevy_ecs::query::Changed<Foo>`, which is required by `QueryIter<'_, '_, &Foo, bevy_ecs::query::Changed<Foo>>: ExactSizeIterator`
5+
| ---------------------- ^^^^^^^^^^^^ invalid `Query` filter
66
| |
77
| required by a bound introduced by this call
88
|
9+
= help: the trait `ArchetypeFilter` is not implemented for `bevy_ecs::query::Changed<Foo>`
10+
= note: an `ArchetypeFilter` typically uses a combination of `With<T>` and `Without<T>` statements
911
= help: the following other types implement trait `ArchetypeFilter`:
10-
With<T>
11-
Without<T>
12-
Or<()>
13-
Or<(F0,)>
14-
Or<(F0, F1)>
15-
Or<(F0, F1, F2)>
16-
Or<(F0, F1, F2, F3)>
17-
Or<(F0, F1, F2, F3, F4)>
12+
()
13+
(F,)
14+
(F0, F1)
15+
(F0, F1, F2)
16+
(F0, F1, F2, F3)
17+
(F0, F1, F2, F3, F4)
18+
(F0, F1, F2, F3, F4, F5)
19+
(F0, F1, F2, F3, F4, F5, F6)
1820
and 26 others
1921
= note: required for `QueryIter<'_, '_, &Foo, bevy_ecs::query::Changed<Foo>>` to implement `ExactSizeIterator`
2022
note: required by a bound in `is_exact_size_iterator`
21-
--> tests/ui/query_exact_sized_iterator_safety.rs:16:30
23+
--> tests/ui/query_exact_sized_iterator_safety.rs:LL:CC
2224
|
2325
16 | fn is_exact_size_iterator<T: ExactSizeIterator>(_iter: T) {}
2426
| ^^^^^^^^^^^^^^^^^ required by this bound in `is_exact_size_iterator`
2527

26-
error[E0277]: the trait bound `bevy_ecs::query::Added<Foo>: ArchetypeFilter` is not satisfied
27-
--> tests/ui/query_exact_sized_iterator_safety.rs:12:28
28+
error[E0277]: `bevy_ecs::query::Added<Foo>` is not a valid `Query` filter based on archetype information
29+
--> tests/ui/query_exact_sized_iterator_safety.rs:LL:CC
2830
|
2931
12 | is_exact_size_iterator(query.iter());
30-
| ---------------------- ^^^^^^^^^^^^ the trait `ArchetypeFilter` is not implemented for `bevy_ecs::query::Added<Foo>`, which is required by `QueryIter<'_, '_, &Foo, bevy_ecs::query::Added<Foo>>: ExactSizeIterator`
32+
| ---------------------- ^^^^^^^^^^^^ invalid `Query` filter
3133
| |
3234
| required by a bound introduced by this call
3335
|
36+
= help: the trait `ArchetypeFilter` is not implemented for `bevy_ecs::query::Added<Foo>`
37+
= note: an `ArchetypeFilter` typically uses a combination of `With<T>` and `Without<T>` statements
3438
= help: the following other types implement trait `ArchetypeFilter`:
35-
With<T>
36-
Without<T>
37-
Or<()>
38-
Or<(F0,)>
39-
Or<(F0, F1)>
40-
Or<(F0, F1, F2)>
41-
Or<(F0, F1, F2, F3)>
42-
Or<(F0, F1, F2, F3, F4)>
39+
()
40+
(F,)
41+
(F0, F1)
42+
(F0, F1, F2)
43+
(F0, F1, F2, F3)
44+
(F0, F1, F2, F3, F4)
45+
(F0, F1, F2, F3, F4, F5)
46+
(F0, F1, F2, F3, F4, F5, F6)
4347
and 26 others
4448
= note: required for `QueryIter<'_, '_, &Foo, bevy_ecs::query::Added<Foo>>` to implement `ExactSizeIterator`
4549
note: required by a bound in `is_exact_size_iterator`
46-
--> tests/ui/query_exact_sized_iterator_safety.rs:16:30
50+
--> tests/ui/query_exact_sized_iterator_safety.rs:LL:CC
4751
|
4852
16 | fn is_exact_size_iterator<T: ExactSizeIterator>(_iter: T) {}
4953
| ^^^^^^^^^^^^^^^^^ required by this bound in `is_exact_size_iterator`

crates/bevy_ecs/compile_fail/tests/ui/query_iter_combinations_mut_iterator_safety.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
error[E0277]: the trait bound `&mut A: ReadOnlyQueryData` is not satisfied
2-
--> tests/ui/query_iter_combinations_mut_iterator_safety.rs:9:17
2+
--> tests/ui/query_iter_combinations_mut_iterator_safety.rs:LL:CC
33
|
44
9 | is_iterator(iter)
5-
| ----------- ^^^^ the trait `ReadOnlyQueryData` is not implemented for `&mut A`, which is required by `QueryCombinationIter<'_, '_, &mut A, (), _>: Iterator`
5+
| ----------- ^^^^ the trait `ReadOnlyQueryData` is not implemented for `&mut A`
66
| |
77
| required by a bound introduced by this call
88
|
99
= help: the following other types implement trait `ReadOnlyQueryData`:
10-
bevy_ecs::change_detection::Ref<'__w, T>
11-
Has<T>
12-
AnyOf<()>
13-
AnyOf<(F0,)>
14-
AnyOf<(F0, F1)>
15-
AnyOf<(F0, F1, F2)>
16-
AnyOf<(F0, F1, F2, F3)>
17-
AnyOf<(F0, F1, F2, F3, F4)>
18-
and 34 others
10+
&Archetype
11+
&T
12+
()
13+
(F,)
14+
(F0, F1)
15+
(F0, F1, F2)
16+
(F0, F1, F2, F3)
17+
(F0, F1, F2, F3, F4)
18+
and 36 others
1919
= note: `ReadOnlyQueryData` is implemented for `&A`, but not for `&mut A`
2020
= note: required for `QueryCombinationIter<'_, '_, &mut A, (), _>` to implement `Iterator`
2121
note: required by a bound in `is_iterator`
22-
--> tests/ui/query_iter_combinations_mut_iterator_safety.rs:13:19
22+
--> tests/ui/query_iter_combinations_mut_iterator_safety.rs:LL:CC
2323
|
2424
13 | fn is_iterator<T: Iterator>(_iter: T) {}
2525
| ^^^^^^^^ required by this bound in `is_iterator`

0 commit comments

Comments
 (0)