-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
allow_private_error
config option
- Loading branch information
Showing
11 changed files
with
95 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
allow-private-error = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
allow-private-error = false |
33 changes: 33 additions & 0 deletions
33
tests/ui-toml/error_impl_error/error_impl_error.allow_private.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
error: type named `Error` that implements `Error` | ||
--> $DIR/error_impl_error.rs:10:16 | ||
| | ||
LL | pub struct Error; | ||
| ^^^^^ | ||
| | ||
note: `Error` was implemented here | ||
--> $DIR/error_impl_error.rs:18:5 | ||
| | ||
LL | impl std::error::Error for Error {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: `-D clippy::error-impl-error` implied by `-D warnings` | ||
|
||
error: type named `Error` that implements `Error` | ||
--> $DIR/error_impl_error.rs:35:15 | ||
| | ||
LL | pub union Error { | ||
| ^^^^^ | ||
| | ||
note: `Error` was implemented here | ||
--> $DIR/error_impl_error.rs:52:5 | ||
| | ||
LL | impl std::error::Error for Error {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: type alias named `Error` that implements `Error` | ||
--> $DIR/error_impl_error.rs:56:14 | ||
| | ||
LL | pub type Error = std::fmt::Error; | ||
| ^^^^^ | ||
|
||
error: aborting due to 3 previous errors | ||
|
26 changes: 13 additions & 13 deletions
26
tests/ui/error_impl_error.stderr → .../error_impl_error.disallow_private.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
error: type named `Error` that implements `Error` | ||
--> $DIR/error_impl_error.rs:7:12 | ||
--> $DIR/error_impl_error.rs:10:16 | ||
| | ||
LL | struct Error; | ||
| ^^^^^ | ||
LL | pub struct Error; | ||
| ^^^^^ | ||
| | ||
note: `Error` was implemented here | ||
--> $DIR/error_impl_error.rs:15:5 | ||
--> $DIR/error_impl_error.rs:18:5 | ||
| | ||
LL | impl std::error::Error for Error {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: `-D clippy::error-impl-error` implied by `-D warnings` | ||
|
||
error: type named `Error` that implements `Error` | ||
--> $DIR/error_impl_error.rs:20:10 | ||
--> $DIR/error_impl_error.rs:23:10 | ||
| | ||
LL | enum Error {} | ||
| ^^^^^ | ||
| | ||
note: `Error` was implemented here | ||
--> $DIR/error_impl_error.rs:28:5 | ||
--> $DIR/error_impl_error.rs:31:5 | ||
| | ||
LL | impl std::error::Error for Error {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: type named `Error` that implements `Error` | ||
--> $DIR/error_impl_error.rs:32:11 | ||
--> $DIR/error_impl_error.rs:35:15 | ||
| | ||
LL | union Error { | ||
| ^^^^^ | ||
LL | pub union Error { | ||
| ^^^^^ | ||
| | ||
note: `Error` was implemented here | ||
--> $DIR/error_impl_error.rs:49:5 | ||
--> $DIR/error_impl_error.rs:52:5 | ||
| | ||
LL | impl std::error::Error for Error {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: type alias named `Error` that implements `Error` | ||
--> $DIR/error_impl_error.rs:53:10 | ||
--> $DIR/error_impl_error.rs:56:14 | ||
| | ||
LL | type Error = std::fmt::Error; | ||
| ^^^^^ | ||
LL | pub type Error = std::fmt::Error; | ||
| ^^^^^ | ||
|
||
error: aborting due to 4 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters