We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Remote crate ("test-macro"):
// lib.rs pub trait Dispatch { type Call; } #[macro_export] macro_rules! decl_issue_two { ( $( #[$attr:meta] )* pub enum $name: ident { $( $call_name: ident, )+ } ) => { $( #[$attr] )* pub enum $name { $( $call_name(<$call_name as $crate::Dispatch>::Call), )+ } } }
Local crate
// main.rs #[macro_use] extern crate test_macro; #[macro_use] extern crate serde_derive; struct MyDispatch; impl ::the_macro::Dispatch for MyDispatch { type Call = (); } decl_issue_two! { #[derive(Deserialize)] pub enum TheEnum2 { MyDispatch, } } fn main() { }
The generated code for TheEnum2 attempts to use the path <MyDispatch as ::test_macro>::Call instead of <MyDispatch as ::test_macro::Dispatch>::Call. See https://github.com/rphmeier/serde_derive_issues
TheEnum2
<MyDispatch as ::test_macro>::Call
<MyDispatch as ::test_macro::Dispatch>::Call
The text was updated successfully, but these errors were encountered:
Thanks! This is a compiler bug, I filed rust-lang/rust#51331 to follow up.
Sorry, something went wrong.
No branches or pull requests
Remote crate ("test-macro"):
Local crate
The generated code for
TheEnum2
attempts to use the path<MyDispatch as ::test_macro>::Call
instead of<MyDispatch as ::test_macro::Dispatch>::Call
.See https://github.com/rphmeier/serde_derive_issues
The text was updated successfully, but these errors were encountered: