-
-
Notifications
You must be signed in to change notification settings - Fork 779
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 #2331 from dtolnay/remote
Improve error message on remote derive duplicate generics
- Loading branch information
Showing
5 changed files
with
47 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use serde_derive::{Deserialize, Serialize}; | ||
|
||
mod remote { | ||
pub struct Struct<T, U> { | ||
pub t: T, | ||
pub u: U, | ||
} | ||
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
#[serde(remote = "remote::StructGeneric<u8>")] | ||
struct StructDef<U> { | ||
t: u8, | ||
u: U, | ||
} | ||
|
||
fn main() {} |
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: remove generic parameters from this path | ||
--> tests/ui/remote/double_generic.rs:11:18 | ||
| | ||
11 | #[serde(remote = "remote::StructGeneric<u8>")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |