Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #306 from shepmaster/location
Add implicit data generation and use it for location tracking
- Loading branch information
Showing
24 changed files
with
1,124 additions
and
103 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#![cfg(test)] | ||
|
||
mod location; | ||
|
||
mod api { | ||
use futures::{stream, StreamExt, TryStream}; | ||
use snafu::prelude::*; | ||
|
Oops, something went wrong.