Skip to content

use $crate; : unresolved import $crate #37352

Closed
@TimNN

Description

@TimNN

From piston2d-gfx_graphics:

error[E0432]: unresolved import `$crate`
  --> src/back_end.rs:30:1
   |
30 | gfx_pipeline_base!( pipe_colored {
   | ^ no `$crate` in the root
   |
   = note: this error originates in a macro outside of the current crate

macro definition:

#[macro_export]
macro_rules! gfx_pipeline_base {
    ($module:ident {
        $( $field:ident: $ty:ty, )*
    }) => {
        pub mod $module {
            use $crate;
            #[allow(unused_imports)]
            use super::*;
            gfx_pipeline_inner!{ $(
                $field: $ty,
            )*}
        }
    }
}

cc @jseyfried, #37213

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions