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

Fix items resoution from prelude on the nightly Rust #4226

Merged
merged 1 commit into from
Aug 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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