Repository: intellij-rust/intellij-rust
Issue: Macro expansion breaks when "true" or "false" is passed as an ident parameter.

<!--
Hello and thank you for the issue!
If you would like to report a bug, we have added some points below that you can fill out.
Feel free to remove all the irrelevant text to request a new feature.
-->

## Environment

* **IntelliJ Rust plugin version:** 0.3.133.3426-202
* **Rust toolchain version:** 1.49.0-nightly (043eca7f0 2020-10-17)
* **IDE name and version:** CLion 2020.2.4 Build #CL-202.7660.37
* **Operating system:** macOS 10.15.7 (19H2)

## Problem description
The plugin seems not to expand macros which accept an identifier as an argument when the identifier is `true` or `false`. Example:
```rust
macro_rules! boba {
    ($endian:ident ) => {
        pub mod arm;
    }
}

boba!(false);
```
If the `arm` module exists CLion will not be able to discover it.

## Steps to reproduce

Create a new cargo project, create file arm.rs in the src directory, define something public in that file. Paste the code snippet above into main.rs (or lib.rs) and try typing `use arm::`. CLion will not show suggestions.


Changed files:
src/main/kotlin/org/rust/lang/core/parser/RustParserUtil.kt, src/test/kotlin/org/rust/lang/core/macros/RsMacroExpansionTest.kt, src/main/kotlin/org/rust/lang/core/parser/RustParserDefinition.kt, src/main/kotlin/org/rust/lang/core/macros/FragmentKind.kt, src/main/kotlin/org/rust/lang/core/macros/MacroExpander.kt

diff --git a/src/main/kotlin/org/rust/lang/core/macros/FragmentKind.kt b/src/main/kotlin/org/rust/lang/core/macros/FragmentKind.kt
index f0c465cf8..bd169f287 100644
--- a/src/main/kotlin/org/rust/lang/core/macros/FragmentKind.kt
+++ b/src/main/kotlin/org/rust/lang/core/macros/FragmentKind.kt
@@ -89,6 +89,9 @@ enum class FragmentKind(private val kind: String) {
          * Some tokens that treated as keywords by our lexer,
          * but rustc's macro parser treats them as identifiers
          */
-        private val IDENTIFIER_TOKENS = TokenSet.orSet(tokenSetOf(RsElementTypes.IDENTIFIER), RS_KEYWORDS)
+        private val IDENTIFIER_TOKENS = TokenSet.orSet(
+            tokenSetOf(RsElementTypes.IDENTIFIER, RsElementTypes.BOOL_LITERAL),
+            RS_KEYWORDS
+        )
     }
 }
diff --git a/src/main/kotlin/org/rust/lang/core/macros/MacroExpander.kt b/src/main/kotlin/org/rust/lang/core/macros/MacroExpander.kt
index 50fc7e5d0..7e8929835 100644
--- a/src/main/kotlin/org/rust/lang/core/macros/MacroExpander.kt
+++ b/src/main/kotlin/org/rust/lang/core/macros/MacroExpander.kt
@@ -333,7 +333,7 @@ class MacroExpander(val project: Project) {
     }
 
     companion object {
-        const val EXPANDER_VERSION = 11
+        const val EXPANDER_VERSION = 12
         private val USELESS_PARENS_EXPRS = tokenSetOf(
             LIT_EXPR, MACRO_EXPR, PATH_EXPR, PAREN_EXPR, TUPLE_EXPR, ARRAY_EXPR, UNIT_EXPR
         )
diff --git a/src/main/kotlin/org/rust/lang/core/parser/RustParserDefinition.kt b/src/main/kotlin/org/rust/lang/core/parser/RustParserDefinition.kt
index 54d7d0fdc..c476ecdfd 100644
--- a/src/main/kotlin/org/rust/lang/core/parser/RustParserDefinition.kt
+++ b/src/main/kotlin/org/rust/lang/core/parser/RustParserDefinition.kt
@@ -94,6 +94,6 @@ class RustParserDefinition : ParserDefinition {
         /**
          * Should be increased after any change of parser rules
          */
-        const val PARSER_VERSION: Int = LEXER_VERSION + 14
+        const val PARSER_VERSION: Int = LEXER_VERSION + 15
     }
 }
diff --git a/src/main/kotlin/org/rust/lang/core/parser/RustParserUtil.kt b/src/main/kotlin/org/rust/lang/core/parser/RustParserUtil.kt
index 7298dea64..f49ebf4f8 100644
--- a/src/main/kotlin/org/rust/lang/core/parser/RustParserUtil.kt
+++ b/src/main/kotlin/org/rust/lang/core/parser/RustParserUtil.kt
@@ -338,7 +338,7 @@ object RustParserUtil : GeneratedParserUtilBase() {
     @JvmStatic
     fun macroIdentifier(b: PsiBuilder, level: Int): Boolean =
         when (b.tokenType) {
-            IDENTIFIER, in RS_KEYWORDS -> {
+            IDENTIFIER, in RS_KEYWORDS, BOOL_LITERAL -> {
                 b.advanceLexer()
                 true
             }
diff --git a/src/test/kotlin/org/rust/lang/core/macros/RsMacroExpansionTest.kt b/src/test/kotlin/org/rust/lang/core/macros/RsMacroExpansionTest.kt
index 226750dd3..288e88f7d 100644
--- a/src/test/kotlin/org/rust/lang/core/macros/RsMacroExpansionTest.kt
+++ b/src/test/kotlin/org/rust/lang/core/macros/RsMacroExpansionTest.kt
@@ -28,7 +28,8 @@ class RsMacroExpansionTest : RsMacroExpansionTestBase() {
     """)
 
     fun `test any rust keyword may be matched as an identifier`() {
-        val keywords = RS_KEYWORDS.types
+        val keywords = RS_KEYWORDS.types.map { it.toString() } +
+            listOf("true", "false")
         doTest("""
             macro_rules! foo {
                 ($ i:ident) => (
@@ -40,7 +41,8 @@ class RsMacroExpansionTest : RsMacroExpansionTestBase() {
     }
 
     fun `test any rust keyword may be used as a metavar name`() {
-        val keywords = TokenSet.andNot(RS_KEYWORDS, tokenSetOf(CRATE)).types
+        val keywords = TokenSet.andNot(RS_KEYWORDS, tokenSetOf(CRATE)).types.map { it.toString() } +
+            listOf("true", "false")
         doTest(keywords.joinToString("\\n") {"""
             macro_rules! ${it}1 {
                 ($ $it:ident) => (