Skip to content

Commit

Permalink
Fix outdated common Resolve::push (#1561)
Browse files Browse the repository at this point in the history
Closes #1559
  • Loading branch information
alexcrichton authored May 15, 2024
1 parent c6732bb commit 962aaa5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/wit-parser/src/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,13 @@ impl Resolve {
/// Appends a new [`UnresolvedPackage`] to this [`Resolve`], creating a
/// fully resolved package with no dangling references.
///
/// The `deps` argument indicates that the named dependencies in
/// `unresolved` to packages are resolved by the mapping specified.
/// All the dependencies of `unresolved` must already have been loaded
/// within this `Resolve` via previous calls to `push` or other methods such
/// as [`Resolve::push_path`].
///
/// Any dependency resolution error or otherwise world-elaboration error
/// will be returned here. If successful a package identifier is returned.
/// will be returned here. If successful a package identifier is returned
/// which corresponds to the package that was just inserted.
pub fn push(&mut self, mut unresolved: UnresolvedPackage) -> Result<PackageId> {
let source_map = mem::take(&mut unresolved.source_map);
source_map.rewrite_error(|| Remap::default().append(self, unresolved))
Expand Down

0 comments on commit 962aaa5

Please sign in to comment.