Skip to content

Commit

Permalink
Fix "Incorrect CachedValue use" exception in RsFile
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad20012 committed Sep 17, 2020
1 parent 79964ca commit 8527c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/org/rust/lang/core/psi/RsFile.kt
Expand Up @@ -203,7 +203,7 @@ class RsFile(
MOD_DECL_KEY to ModificationTracker.NEVER_CHANGED
}
return CachedValuesManager.getCachedValue(originalFile, key) {
val decl = if (isCrateRoot) emptyList() else RsModulesIndex.getDeclarationsFor(originalFile)
val decl = if (originalFile.isCrateRoot) emptyList() else RsModulesIndex.getDeclarationsFor(originalFile)
CachedValueProvider.Result.create(
decl,
originalFile.rustStructureOrAnyPsiModificationTracker,
Expand Down

0 comments on commit 8527c7c

Please sign in to comment.