From 7902bf8cb02d47d7ba6386ca6191dca2c2a96821 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Mon, 5 Aug 2024 23:37:58 -0400 Subject: [PATCH] refactor: remove unused `Workspace::new_virtual` It was designed for `-Zbuild-std` --- src/cargo/core/workspace.rs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/cargo/core/workspace.rs b/src/cargo/core/workspace.rs index 0e538c698e1..3a2588e412c 100644 --- a/src/cargo/core/workspace.rs +++ b/src/cargo/core/workspace.rs @@ -244,25 +244,6 @@ impl<'gctx> Workspace<'gctx> { } } - pub fn new_virtual( - root_path: PathBuf, - current_manifest: PathBuf, - manifest: VirtualManifest, - gctx: &'gctx GlobalContext, - ) -> CargoResult> { - let mut ws = Workspace::new_default(current_manifest, gctx); - ws.root_manifest = Some(root_path.join("Cargo.toml")); - ws.target_dir = gctx.target_dir()?; - ws.packages - .packages - .insert(root_path, MaybePackage::Virtual(manifest)); - ws.find_members()?; - ws.set_resolve_behavior()?; - // TODO: validation does not work because it walks up the directory - // tree looking for the root which is a fake file that doesn't exist. - Ok(ws) - } - /// Creates a "temporary workspace" from one package which only contains /// that package. ///