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

MACRO: Fix macro expansion error messages in several cases #9095

Merged
merged 2 commits into from Jul 20, 2022

Conversation

vlad20012
Copy link
Member

  1. Show message "the macro call is conditionally disabled with a #[cfg()] attribute" in the case of cfg-disabled macro call that refers to a declarative macro. Previously there was some other unrelated error message. For example "procedural macro expansion is not enabled" if org.rust.cargo.evaluate.build.scripts and/or org.rust.macros.proc experimental features are disabled.
macro_rules! foo {
    () => { fn foo() {} }
}
#[cfg(not(intellij_rust))]
foo! {}
  1. Show message "the procedural macro is not compiled successfully" when org.rust.cargo.evaluate.build.scripts and/or org.rust.macros.proc experimental features are disabled. Previously the error was "the procedural macro is not compiled successfully"

Also add tests for these cases.

changelog: Fix error messages about unsuccessful macro expansion in the case when procedural macro expansion is not enabled and in the case when a declarative macro call is conditionally disabled

@vlad20012 vlad20012 added the fix Pull requests that fix some bug(s) label Jul 20, 2022
@vlad20012 vlad20012 added this to In Progress in To test via automation Jul 20, 2022
@vlad20012 vlad20012 self-assigned this Jul 20, 2022
@vlad20012 vlad20012 changed the title MACRO: Fix macro expansion errors in several cases MACRO: Fix macro expansion error messages in several cases Jul 20, 2022
@vlad20012
Copy link
Member Author

bors r+

1 similar comment
@vlad20012
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 20, 2022

Already running a review

@bors
Copy link
Contributor

bors bot commented Jul 20, 2022

Build succeeded:

@bors bors bot merged commit 8782c30 into master Jul 20, 2022
To test automation moved this from In Progress to Test Jul 20, 2022
@bors bors bot deleted the fix-decl-macro-expansion-error branch July 20, 2022 23:56
@github-actions github-actions bot added this to the v176 milestone Jul 20, 2022
@mili-l mili-l self-assigned this Jul 26, 2022
@mili-l mili-l moved this from Test to Done in To test Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests that fix some bug(s)
Projects
To test
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants