fix(rust): Restrict equal types to the current world#1549
Merged
alexcrichton merged 9 commits intobytecodealliance:mainfrom Feb 27, 2026
Merged
fix(rust): Restrict equal types to the current world#1549alexcrichton merged 9 commits intobytecodealliance:mainfrom
alexcrichton merged 9 commits intobytecodealliance:mainfrom
Conversation
Member
|
Oh sorry I didn't realize this was ready for some review. I figured draft + failing tests meant there was still some work to do locally. These changes in general look good to me, I'm not entirely sure what would cause the test failures though. To me though it seems like it's in the right direction at least for resolving #1543 (I'd also request to be sure to include tests as well here though) |
crates/core/src/types.rs
Outdated
| let types: Vec<_> = resolve | ||
| .types | ||
| .iter() | ||
| .filter(|(t, _)| live_types.contains(*t)) |
Member
There was a problem hiding this comment.
Oh for this it should be sufficient to switch the iterator below to iterating over the live_types set, no need to iterate over the resolve's types, filter to what live_types has, and then iterate over that set
Contributor
Author
|
Thanks! This is indeed much better! |
alexcrichton
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1543
name_interfaceto preprocess phase to avoid crashing when referring to not-yet-generated types from bindgenwasi-filesystem-merge-equal, which is fixed by this PR.