Skip to content

Confusing error message: "can't qualify macro invocation with pub" when struct keyword missing #55403

Closed

Description

@jimblandy

The program:

pub LexicalEnv<'a>

elicits the confusing error message:

error: can't qualify macro invocation with `pub`
 --> src/lib.rs:1:1
  |
1 | pub LexicalEnv<'a>
  | ^^^
  |
  = help: try adjusting the macro to put `pub` inside the invocation

error: expected one of `!` or `::`, found `<`
 --> src/lib.rs:1:15
  |
1 | pub LexicalEnv<'a>
  |               ^ expected one of `!` or `::` here

Similar issues have been filed before (#40006 and #38911, at least), and were not closed with an indication that the problem wasn't expected to be fixed, so I'm going ahead and filing this. This specific case was mentioned in a comment by @fschutt.

Activity

  1. added
    A-diagnosticsArea: Messages for errors, warnings, and lints
    on Oct 27, 2018
  2. added a commit that references this issue on Dec 8, 2018
    ac15b4f
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-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions