Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out where topo::nested is losing spans #123

Closed
anp opened this issue May 20, 2020 · 2 comments
Closed

Figure out where topo::nested is losing spans #123

anp opened this issue May 20, 2020 · 2 comments

Comments

@anp
Copy link
Owner

anp commented May 20, 2020

I'm pretty sure that the worst error messages I'm seeing now are from #[topo::nested] functions (removing the annotation improves the error message).

@anp
Copy link
Owner Author

anp commented May 21, 2020

This occurs with literally any logic in the proc macro, including just a parse/quote pair:

#[proc_macro_attribute]
pub fn nested(args: TokenStream, input: TokenStream) -> TokenStream {
    let mut input_fn: ItemFn = syn::parse(input).unwrap();
    // other stuff normally goes here
    input_fn.into_token_stream().into()
}

@anp
Copy link
Owner Author

anp commented May 21, 2020

Based on dtolnay/async-trait#91 (comment) this is caused by a compiler bug (rust-lang/rust#43081)

Should be resolved by rust-lang/rust#72306.

@anp anp closed this as completed May 23, 2020
anp added a commit that referenced this issue May 23, 2020
Closes #123
anp added a commit that referenced this issue May 25, 2020
Closes #123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant