Skip to content

Test passes when there are errors in cargo-expand output #114

@Pistonight

Description

@Pistonight

I am not sure if this is a cargo-expand issue or intentional

If a syn::Type has generics and is used in an expression like #ty::#ident, cargo-expand outputs "(/ERROR/)"

use quote::quote;
let ty = syn::parse_quote! { Box<Foo> };
// put this somewhere in the expand output
quote! { #ty::some_thing }

The output will be:

(/*ERROR*/)

The catch is the syntax should be quote! { <#ty>::some_thing }. However, macrotest will pass.

Ideally, there are some places in other tests/examples that use the macro and will catch the issue, but would be nice if macrotest fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions