Skip to content

use $crate; : unresolved import $crate #37352

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

Activity

  1. added
    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.
    on Oct 22, 2016
  2. jseyfried commented on Oct 23, 2016

    @jseyfried
    Contributor

    Fixed in #37361.

  3. added a commit that references this issue on Oct 26, 2016
    a7557e7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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