Repository: intellij-rust/intellij-rust
Issue: Nothing works in sixtyfps project

## Environment

* **IntelliJ Rust plugin version:** 0.4.160.4220-212-nightly
* **Rust toolchain version:** 1.56.1 (59eed8a2a 2021-11-01) x86_64-unknown-linux-gnu
* **IDE name and version:** IntelliJ IDEA 2021.2.3 Ultimate Edition (IU-212.5457.46)
* **Operating system:** Linux 5.11.0-38-generic
* **Macro expansion engine:** new
* **Name resolution engine:** new

## Problem description

There is a crash during DefMap building, so nothing works after that

<details>
  <summary>Stacktrace</summary>
  
  ```
  com.intellij.psi.PsiInvalidElementAccessException: Element: class org.rust.lang.core.psi.impl.RsMacroExprImpl; no psi for file stub RsFileStub, invalidation reason=null
	at com.intellij.psi.impl.source.SubstrateRef$StubRef.reportError(SubstrateRef.java:156)
	at com.intellij.psi.impl.source.SubstrateRef$StubRef.getContainingFile(SubstrateRef.java:148)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getContainingFile(StubBasedPsiElementBase.java:239)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getNode(StubBasedPsiElementBase.java:120)
	at com.intellij.psi.PsiInvalidElementAccessException.getPsiInvalidationTrace(PsiInvalidElementAccessException.java:98)
	at com.intellij.psi.PsiInvalidElementAccessException.<init>(PsiInvalidElementAccessException.java:61)
	at com.intellij.psi.impl.source.SubstrateRef$StubRef.reportError(SubstrateRef.java:156)
	at com.intellij.psi.impl.source.SubstrateRef$StubRef.getContainingFile(SubstrateRef.java:148)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getContainingFile(StubBasedPsiElementBase.java:239)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getProject(StubBasedPsiElementBase.java:276)
	at org.rust.lang.core.psi.ext.RsMacroCallKt.getValue(RsMacroCall.kt:122)
	at org.rust.lang.core.psi.ext.RsMacroCallKt.getIncludeMacroArgument(RsMacroCall.kt:145)
	at org.rust.lang.core.resolve2.ModCollectorBase.collectMacroCall(ModCollectorBase.kt:203)
	at org.rust.lang.core.resolve2.ModCollectorBase.collectElementWithoutAttrMacros(ModCollectorBase.kt:96)
	at org.rust.lang.core.resolve2.ModCollectorBase.collectElement(ModCollectorBase.kt:73)
	at org.rust.lang.core.resolve2.ModCollectorBase.collectElements(ModCollectorBase.kt:52)
	at org.rust.lang.core.resolve2.ModCollectorBase.access$collectElements(ModCollectorBase.kt:31)
	at org.rust.lang.core.resolve2.ModCollectorBase$Companion.collectMod(ModCollectorBase.kt:332)
	at org.rust.lang.core.resolve2.ModCollector.collectMod(ModCollector.kt:118)
	at org.rust.lang.core.resolve2.ModCollectorKt.collectExpandedElements(ModCollector.kt:78)
	at org.rust.lang.core.resolve2.DefCollector.recordExpansion(DefCollector.kt:361)
	at org.rust.lang.core.resolve2.DefCollector.expandMacrosInParallel(DefCollector.kt:341)
	at org.rust.lang.core.resolve2.DefCollector.expandMacros(DefCollector.kt:318)
	at org.rust.lang.core.resolve2.DefCollector.collect(DefCollector.kt:80)
	at org.rust.lang.core.resolve2.FacadeBuildDefMapKt.buildDefMap(FacadeBuildDefMap.kt:43)
	at org.rust.lang.core.resolve2.DefMapsBuilder.doBuildDefMap(DefMapsBuilder.kt:111)
	at org.rust.lang.core.resolve2.DefMapsBuilder.access$doBuildDefMap(DefMapsBuilder.kt:21)
	at org.rust.lang.core.resolve2.DefMapsBuilder$buildDefMapAsync$1$1$1.invoke(DefMapsBuilder.kt:91)
	at org.rust.lang.core.resolve2.DefMapsBuilder$buildDefMapAsync$1$1$1.invoke(DefMapsBuilder.kt:90)
	at org.rust.openapiext.UtilsKt$computeInReadActionWithWriteActionPriority$success$1.invoke(utils.kt:331)
	at org.rust.openapiext.UtilsKt$computeInReadActionWithWriteActionPriority$success$1.invoke(utils.kt:330)
	at org.rust.openapiext.UtilsKt.runInReadActionWithWriteActionPriority$lambda-12(utils.kt:326)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:78)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:161)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:118)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:115)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:78)
	at org.rust.openapiext.UtilsKt.runInReadActionWithWriteActionPriority(utils.kt:326)
	at org.rust.openapiext.UtilsKt.computeInReadActionWithWriteActionPriority(utils.kt:330)
	at org.rust.lang.core.resolve2.DefMapsBuilder.buildDefMapAsync$lambda-7(DefMapsBuilder.kt:90)
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
  ```
</details>

## Steps to reproduce

1. open https://github.com/sixtyfpsui/sixtyfps
2. open file `examples/printerdemo/rust/main.rs`

Changed files:
src/main/kotlin/org/rust/lang/core/psi/ext/RsMacroCall.kt

diff --git a/src/main/kotlin/org/rust/lang/core/psi/ext/RsMacroCall.kt b/src/main/kotlin/org/rust/lang/core/psi/ext/RsMacroCall.kt
index a274a67ee..b6f4da143 100644
--- a/src/main/kotlin/org/rust/lang/core/psi/ext/RsMacroCall.kt
+++ b/src/main/kotlin/org/rust/lang/core/psi/ext/RsMacroCall.kt
@@ -119,7 +119,7 @@ private fun RsExpr.getValue(crateOrNull: Crate?): String? {
                     when (val variableName = expr.getValue(crate)) {
                         "OUT_DIR" -> crate.outDir?.path
                         else -> {
-                            val toolchain = if (isUnitTestMode) RsToolchainBase.suggest() else project.toolchain
+                            val toolchain = if (isUnitTestMode) RsToolchainBase.suggest() else crate.project.toolchain
                             crate.env[variableName]?.let { toolchain?.toLocalPath(it) }
                         }
                     }