Skip to content

Commit

Permalink
Merge #4226
Browse files Browse the repository at this point in the history
4226: Fix items resoution from prelude on the nightly Rust r=Undin a=vlad20012



Co-authored-by: vlad20012 <beskvlad@gmail.com>
  • Loading branch information
bors[bot] and vlad20012 committed Aug 5, 2019
2 parents d440658 + 6b9f2a5 commit 2d00711
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/kotlin/org/rust/lang/core/resolve/NameResolution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,9 @@ fun processNestedScopesUpwards(

val prelude = findPrelude(scopeStart)
if (prelude != null) {
val preludeProcessor: (ScopeEntry) -> Boolean = { v -> v.name !in prevScope && processor(v) }
// XXX: fix prelude items resolve on the nightly. Revert it to `v -> v.name !in prevScope`
// after cfg attrs support or when `#[cfg(bootstrap)]` will be removed from the prelude
val preludeProcessor: (ScopeEntry) -> Boolean = { v -> prevScope.add(v.name) && processor(v) }
return processItemDeclarationsWithCache(prelude, ns, preludeProcessor, ItemProcessingMode.WITHOUT_PRIVATE_IMPORTS)
}

Expand Down

0 comments on commit 2d00711

Please sign in to comment.