Skip to content

Commit 962aaa5

Browse files
authored
Fix outdated common Resolve::push (#1561)
Closes #1559
1 parent c6732bb commit 962aaa5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

crates/wit-parser/src/resolve.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,13 @@ impl Resolve {
336336
/// Appends a new [`UnresolvedPackage`] to this [`Resolve`], creating a
337337
/// fully resolved package with no dangling references.
338338
///
339-
/// The `deps` argument indicates that the named dependencies in
340-
/// `unresolved` to packages are resolved by the mapping specified.
339+
/// All the dependencies of `unresolved` must already have been loaded
340+
/// within this `Resolve` via previous calls to `push` or other methods such
341+
/// as [`Resolve::push_path`].
341342
///
342343
/// Any dependency resolution error or otherwise world-elaboration error
343-
/// will be returned here. If successful a package identifier is returned.
344+
/// will be returned here. If successful a package identifier is returned
345+
/// which corresponds to the package that was just inserted.
344346
pub fn push(&mut self, mut unresolved: UnresolvedPackage) -> Result<PackageId> {
345347
let source_map = mem::take(&mut unresolved.source_map);
346348
source_map.rewrite_error(|| Remap::default().append(self, unresolved))

0 commit comments

Comments
 (0)