Skip to content

Commit a5d8298

Browse files
committed
Replace plugins_dylib_path with host_deps_output.
The plugins_dylib_path field on Compilation is removed because it is identical to host_deps_output, it is only used in one easily replaced location, and because host_deps_output is a more general name that includes its new usage location in cargo_test.rs as well while better matching the corresponding deps_output field. Also de-indents erroneously indented lines in a test case.
1 parent 3b5ec88 commit a5d8298

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

src/cargo/ops/cargo_rustc/compilation.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ pub struct Compilation<'cfg> {
3535
/// Output directory for the rust host dependencies.
3636
pub host_deps_output: PathBuf,
3737

38-
/// Library search path for compiler plugins and build scripts
39-
/// which have dynamic dependencies.
40-
pub plugins_dylib_path: PathBuf,
41-
4238
/// The path to rustc's own libstd
4339
pub host_dylib_path: Option<PathBuf>,
4440

@@ -69,7 +65,6 @@ impl<'cfg> Compilation<'cfg> {
6965
root_output: PathBuf::from("/"),
7066
deps_output: PathBuf::from("/"),
7167
host_deps_output: PathBuf::from("/"),
72-
plugins_dylib_path: PathBuf::from("/"),
7368
host_dylib_path: None,
7469
target_dylib_path: None,
7570
tests: Vec::new(),
@@ -129,7 +124,7 @@ impl<'cfg> Compilation<'cfg> {
129124
-> CargoResult<ProcessBuilder> {
130125

131126
let mut search_path = if is_host {
132-
let mut search_path = vec![self.plugins_dylib_path.clone()];
127+
let mut search_path = vec![self.host_deps_output.clone()];
133128
search_path.extend(self.host_dylib_path.clone());
134129
search_path
135130
} else {

src/cargo/ops/cargo_rustc/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
175175
None => {}
176176
}
177177

178-
self.compilation.plugins_dylib_path = self.host.deps().to_path_buf();
179178
self.compilation.host_deps_output = self.host.deps().to_path_buf();
180179

181180
let layout = self.target.as_ref().unwrap_or(&self.host);

tests/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,8 +2828,8 @@ fn find_dependency_of_proc_macro_dependency_with_target() {
28282828
"".parse().unwrap()
28292829
}
28302830
"#);
2831-
Package::new("dep_of_proc_macro_dep", "0.1.0").publish();
2832-
workspace.build();
2831+
Package::new("dep_of_proc_macro_dep", "0.1.0").publish();
2832+
workspace.build();
28332833
assert_that(workspace.cargo("test").arg("--all").arg("--target").arg(rustc_host()),
28342834
execs().with_status(0));
28352835
}

0 commit comments

Comments
 (0)