Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Nested maps don't compile #183

@piegamesde

Description

@piegamesde
let map = phf_map!{
	"foo" => phf_map!{"k"=>"v"}
};

Compile error:

error[E0659]: `proc_macro_call` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
  --> src/main.rs:57:12
   |
57 |       let map = phf_map!{
   |  _______________^
58 | |         "foo" => phf_map!{"k"=>"v"}
59 | |     };
   | |_____^ ambiguous name
   |
note: `proc_macro_call` could refer to the macro defined here
  --> src/main.rs:57:12
   |
57 |       let map = phf_map!{
   |  _______________^
58 | |         "foo" => phf_map!{"k"=>"v"}
59 | |     };
   | |_____^
note: `proc_macro_call` could also refer to the macro defined here
  --> src/main.rs:57:12
   |
57 |       let map = phf_map!{
   |  _______________^
58 | |         "foo" => phf_map!{"k"=>"v"}
59 | |     };
   | |_____^
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions