-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ece503
commit 4b5ebfc
Showing
10 changed files
with
261 additions
and
35 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
22 changes: 22 additions & 0 deletions
22
compatibility-tests/compile-fail/tests/ui/duplication-implicit-attributes.rs
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,22 @@ | ||
use snafu::prelude::*; | ||
|
||
#[derive(Debug)] | ||
struct ImplicitData; | ||
|
||
impl snafu::GenerateImplicitData for ImplicitData { | ||
fn generate() -> Self { | ||
Self | ||
} | ||
} | ||
|
||
#[derive(Debug, Snafu)] | ||
enum EnumError { | ||
AVariant { | ||
// Second attribute should be marked as duplicate | ||
#[snafu(implicit)] | ||
#[snafu(implicit)] | ||
my_data: ImplicitData, | ||
}, | ||
} | ||
|
||
fn main() {} |
5 changes: 5 additions & 0 deletions
5
compatibility-tests/compile-fail/tests/ui/duplication-implicit-attributes.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,5 @@ | ||
error: Multiple `implicit` attributes are not supported on a field | ||
--> $DIR/duplication-implicit-attributes.rs:17:17 | ||
| | ||
17 | #[snafu(implicit)] | ||
| ^^^^^^^^ |
2 changes: 1 addition & 1 deletion
2
compatibility-tests/compile-fail/tests/ui/structs/attribute-misuse.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
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
Oops, something went wrong.