Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show error that pub cannot be used for macros #9619

Open
neonaot opened this issue Oct 26, 2022 · 0 comments · May be fixed by #10437
Open

Show error that pub cannot be used for macros #9619

neonaot opened this issue Oct 26, 2022 · 0 comments · May be fixed by #10437
Labels
feature help wanted subsystem::highlighting Issues related to code highlighting

Comments

@neonaot
Copy link
Member

neonaot commented Oct 26, 2022

Environment

  • IntelliJ Rust plugin version: 0.4.182.4968-223-nightly
  • Rust toolchain version: 1.66.0-nightly (758f19645 2022-10-24) x86_64-apple-darwin
  • IDE name and version: CLion 2022.3 EAP (CL-223.7126.6)
  • Operating system: macOS 12.5.1
  • Macro expansion: enabled
  • Additional experimental features: org.rust.cargo.features.settings.gutter, org.rust.cargo.emulate.terminal, org.rust.macros.proc

Problem description

image

And quick fix with the suggestion #[macro_export] will be helpful.

Steps to reproduce

pub macro_rules! mymacro { // can't qualify macro_rules invocation with `pub`
    () => {println!("hello")}; 
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature help wanted subsystem::highlighting Issues related to code highlighting
Projects
None yet
1 participant