Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/module/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,14 @@ impl Module {
}

// 4. Find undeclared functions and synthesize a Declared element segment.
let undeclared: Vec<_> = ref_funcs
let mut undeclared: Vec<_> = ref_funcs
.iter()
.copied()
.filter(|f| !declared.contains(f))
.collect();
// Sort to ensure we emit the Declared element segment deterministically,
// regardless of IdHashSet iteration order.
undeclared.sort_unstable();
if !undeclared.is_empty() {
log::debug!(
"synthesizing Declared element segment for {} undeclared ref.func references",
Expand Down
Loading