Skip to content

Commit

Permalink
Bless the new .stderr output of compile fail tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Brezak committed Mar 1, 2025
1 parent 8c3f97c commit aa7c1b4
Show file tree
Hide file tree
Showing 43 changed files with 1,097 additions and 373 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: unexpected token in attribute
--> tests/deref_derive/invalid_attribute_fail.rs:8:12
|
8 | #[deref()] String
| ^
--> tests/deref_derive/invalid_attribute_fail.rs:LL:CC
|
LL | #[deref()] String
| ^

error: unexpected token in attribute
--> tests/deref_derive/invalid_attribute_fail.rs:15:12
--> tests/deref_derive/invalid_attribute_fail.rs:LL:CC
|
15 | #[deref()]
LL | #[deref()]
| ^

error: aborting due to 2 previous errors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error: Deref cannot be derived on field-less structs
--> tests/deref_derive/invalid_item_fail.rs:3:10
|
3 | #[derive(Deref)]
| ^^^^^
|
--> tests/deref_derive/invalid_item_fail.rs:LL:CC
|
LL | #[derive(Deref)]
| ^^^^^
|
= note: this error originates in the derive macro `Deref` (in Nightly builds, run with -Z macro-backtrace for more info)

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

error: aborting due to 2 previous errors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error: deriving Deref on multi-field structs requires one field to have the `#[deref]` attribute
--> tests/deref_derive/missing_attribute_fail.rs:3:10
|
3 | #[derive(Deref)]
| ^^^^^
|
--> tests/deref_derive/missing_attribute_fail.rs:LL:CC
|
LL | #[derive(Deref)]
| ^^^^^
|
= note: this error originates in the derive macro `Deref` (in Nightly builds, run with -Z macro-backtrace for more info)

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

error: aborting due to 2 previous errors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: `#[deref]` attribute can only be used on a single field
--> tests/deref_derive/multiple_attributes_fail.rs:6:5
|
6 | #[deref] String
| ^^^^^^^^
--> tests/deref_derive/multiple_attributes_fail.rs:LL:CC
|
LL | #[deref] String
| ^^^^^^^^

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

error: aborting due to 2 previous errors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: unexpected token in attribute
--> tests/deref_mut_derive/invalid_attribute_fail.rs:9:12
|
9 | #[deref()] String
| ^
--> tests/deref_mut_derive/invalid_attribute_fail.rs:LL:CC
|
LL | #[deref()] String
| ^

error: unexpected token in attribute
--> tests/deref_mut_derive/invalid_attribute_fail.rs:24:12
--> tests/deref_mut_derive/invalid_attribute_fail.rs:LL:CC
|
24 | #[deref()]
LL | #[deref()]
| ^

error: aborting due to 2 previous errors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error: DerefMut cannot be derived on field-less structs
--> tests/deref_mut_derive/invalid_item_fail.rs:3:10
|
3 | #[derive(DerefMut)]
| ^^^^^^^^
|
--> tests/deref_mut_derive/invalid_item_fail.rs:LL:CC
|
LL | #[derive(DerefMut)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)

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

error: aborting due to 2 previous errors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
error[E0308]: mismatched types
--> tests/deref_mut_derive/mismatched_target_type_fail.rs:4:10
|
4 | #[derive(DerefMut)]
| ^^^^^^^^
| |
| expected `&mut String`, found `&mut usize`
| expected `&mut String` because of return type
|
--> tests/deref_mut_derive/mismatched_target_type_fail.rs:LL:CC
|
LL | #[derive(DerefMut)]
| ^^^^^^^^
| |
| expected `&mut String`, found `&mut usize`
| expected `&mut String` because of return type
|
= note: expected mutable reference `&mut String`
found mutable reference `&mut usize`
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
--> tests/deref_mut_derive/mismatched_target_type_fail.rs:16:10
--> tests/deref_mut_derive/mismatched_target_type_fail.rs:LL:CC
|
16 | #[derive(DerefMut)]
LL | #[derive(DerefMut)]
| ^^^^^^^^
| |
| expected `&mut String`, found `&mut usize`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
error: deriving DerefMut on multi-field structs requires one field to have the `#[deref]` attribute
--> tests/deref_mut_derive/missing_attribute_fail.rs:4:10
|
4 | #[derive(DerefMut)]
| ^^^^^^^^
|
--> tests/deref_mut_derive/missing_attribute_fail.rs:LL:CC
|
LL | #[derive(DerefMut)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)

error: deriving DerefMut on multi-field structs requires one field to have the `#[deref]` attribute
--> tests/deref_mut_derive/missing_attribute_fail.rs:16:10
--> tests/deref_mut_derive/missing_attribute_fail.rs:LL:CC
|
16 | #[derive(DerefMut)]
LL | #[derive(DerefMut)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
error[E0277]: the trait bound `TupleStruct: Deref` is not satisfied
--> tests/deref_mut_derive/missing_deref_fail.rs:10:8
|
10 | struct TupleStruct(usize, #[deref] String);
| ^^^^^^^^^^^ the trait `Deref` is not implemented for `TupleStruct`
|
--> tests/deref_mut_derive/missing_deref_fail.rs:LL:CC
|
LL | struct TupleStruct(usize, #[deref] String);
| ^^^^^^^^^^^ the trait `Deref` is not implemented for `TupleStruct`
|
note: required by a bound in `DerefMut`
--> $RUSTUP_HOME/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/library/core/src/ops/deref.rs:264:21
|
264 | pub trait DerefMut: Deref {
| ^^^^^ required by this bound in `DerefMut`
--> RUSTLIB/core/src/ops/deref.rs:LL:CC
|
LL | pub trait DerefMut: ~const Deref {
| ^^^^^^^^^^^^ required by this bound in `DerefMut`

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

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

error[E0277]: the trait bound `Struct: Deref` is not satisfied
--> tests/deref_mut_derive/missing_deref_fail.rs:13:10
--> tests/deref_mut_derive/missing_deref_fail.rs:LL:CC
|
13 | #[derive(DerefMut)]
LL | #[derive(DerefMut)]
| ^^^^^^^^ the trait `Deref` is not implemented for `Struct`
|
= note: this error originates in the derive macro `DerefMut` (in Nightly builds, run with -Z macro-backtrace for more info)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: `#[deref]` attribute can only be used on a single field
--> tests/deref_mut_derive/multiple_attributes_fail.rs:7:5
|
7 | #[deref] String
| ^^^^^^^^
--> tests/deref_mut_derive/multiple_attributes_fail.rs:LL:CC
|
LL | #[deref] String
| ^^^^^^^^

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

error: aborting due to 2 previous errors
Expand Down
Loading

0 comments on commit aa7c1b4

Please sign in to comment.