Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6737e08

Browse files
committed
Fix some incorrect replacements in rustc args
1 parent 27e81bc commit 6737e08

File tree

10 files changed

+37
-37
lines changed

10 files changed

+37
-37
lines changed

crates/rustfix/tests/parse_and_replace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn compile(file: &Path) -> Result<Output, Error> {
5353
"--error-format=json".into(),
5454
"--emit=metadata".into(),
5555
"--crate-name=rustfix_test".into(),
56-
"--artifact-dir".into(),
56+
"--out-dir".into(),
5757
tmp.path().into(),
5858
];
5959

crates/semver-check/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ fn compile(
190190
crate_type,
191191
"--crate-name",
192192
crate_name,
193-
"--artifact-dir",
193+
"--out-dir",
194194
]);
195195
cmd.arg(&out_dir);
196196
if extern_path {

src/cargo/core/compiler/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ fn build_base_args(
11371137
cmd.arg("-C").arg("rpath");
11381138
}
11391139

1140-
cmd.arg("--artifact-dir")
1140+
cmd.arg("--out-dir")
11411141
.arg(&build_runner.files().out_dir(unit));
11421142

11431143
fn opt(cmd: &mut ProcessBuilder, key: &str, prefix: &str, val: Option<&OsStr>) {

tests/testsuite/build.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,14 +1512,14 @@ fn cargo_default_env_metadata_env_var() {
15121512
--emit=[..]link \
15131513
-C prefer-dynamic[..]-C debuginfo=2 [..]\
15141514
-C metadata=[..] \
1515-
--artifact-dir [..] \
1515+
--out-dir [..] \
15161516
-L dependency=[CWD]/target/debug/deps`
15171517
[COMPILING] foo v0.0.1 ([CWD])
15181518
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \
15191519
--emit=[..]link[..]-C debuginfo=2 [..]\
15201520
-C metadata=[..] \
15211521
-C extra-filename=[..] \
1522-
--artifact-dir [..] \
1522+
--out-dir [..] \
15231523
-L dependency=[CWD]/target/debug/deps \
15241524
--extern bar=[CWD]/target/debug/deps/{prefix}bar{suffix}`
15251525
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]",
@@ -1540,14 +1540,14 @@ fn cargo_default_env_metadata_env_var() {
15401540
--emit=[..]link \
15411541
-C prefer-dynamic[..]-C debuginfo=2 [..]\
15421542
-C metadata=[..] \
1543-
--artifact-dir [..] \
1543+
--out-dir [..] \
15441544
-L dependency=[CWD]/target/debug/deps`
15451545
[COMPILING] foo v0.0.1 ([CWD])
15461546
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \
15471547
--emit=[..]link[..]-C debuginfo=2 [..]\
15481548
-C metadata=[..] \
15491549
-C extra-filename=[..] \
1550-
--artifact-dir [..] \
1550+
--out-dir [..] \
15511551
-L dependency=[CWD]/target/debug/deps \
15521552
--extern bar=[CWD]/target/debug/deps/{prefix}bar-[..]{suffix}`
15531553
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
@@ -2294,7 +2294,7 @@ fn verbose_build() {
22942294
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \
22952295
--emit=[..]link[..]-C debuginfo=2 [..]\
22962296
-C metadata=[..] \
2297-
--artifact-dir [..] \
2297+
--out-dir [..] \
22982298
-L dependency=[CWD]/target/debug/deps`
22992299
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
23002300
",
@@ -2313,7 +2313,7 @@ fn verbose_release_build() {
23132313
--emit=[..]link[..]\
23142314
-C opt-level=3[..]\
23152315
-C metadata=[..] \
2316-
--artifact-dir [..] \
2316+
--out-dir [..] \
23172317
-L dependency=[CWD]/target/release/deps`
23182318
[FINISHED] `release` profile [optimized] target(s) in [..]
23192319
",
@@ -2332,7 +2332,7 @@ fn verbose_release_build_short() {
23322332
--emit=[..]link[..]\
23332333
-C opt-level=3[..]\
23342334
-C metadata=[..] \
2335-
--artifact-dir [..] \
2335+
--out-dir [..] \
23362336
-L dependency=[CWD]/target/release/deps`
23372337
[FINISHED] `release` profile [optimized] target(s) in [..]
23382338
",
@@ -2386,14 +2386,14 @@ fn verbose_release_build_deps() {
23862386
-C prefer-dynamic[..]\
23872387
-C opt-level=3[..]\
23882388
-C metadata=[..] \
2389-
--artifact-dir [..] \
2389+
--out-dir [..] \
23902390
-L dependency=[CWD]/target/release/deps`
23912391
[COMPILING] test v0.0.0 ([CWD])
23922392
[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib \
23932393
--emit=[..]link[..]\
23942394
-C opt-level=3[..]\
23952395
-C metadata=[..] \
2396-
--artifact-dir [..] \
2396+
--out-dir [..] \
23972397
-L dependency=[CWD]/target/release/deps \
23982398
--extern foo=[CWD]/target/release/deps/{prefix}foo{suffix} \
23992399
--extern foo=[CWD]/target/release/deps/libfoo.rlib`
@@ -6282,7 +6282,7 @@ fn build_lib_only() {
62826282
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \
62836283
--emit=[..]link[..]-C debuginfo=2 [..]\
62846284
-C metadata=[..] \
6285-
--artifact-dir [..] \
6285+
--out-dir [..] \
62866286
-L dependency=[CWD]/target/debug/deps`
62876287
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]",
62886288
)

tests/testsuite/build_script.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,19 +1827,19 @@ fn build_cmd_with_a_build_cmd() {
18271827
[RUNNING] `rustc --crate-name a [..]lib.rs [..]--crate-type lib \
18281828
--emit=[..]link[..] \
18291829
-C metadata=[..] \
1830-
--artifact-dir [..]target/debug/deps \
1830+
--out-dir [..]target/debug/deps \
18311831
-L [..]target/debug/deps`
18321832
[COMPILING] foo v0.5.0 ([CWD])
18331833
[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin \
18341834
--emit=[..]link[..]\
1835-
-C metadata=[..] --artifact-dir [..] \
1835+
-C metadata=[..] --out-dir [..] \
18361836
-L [..]target/debug/deps \
18371837
--extern a=[..]liba[..].rlib`
18381838
[RUNNING] `[..]/foo-[..]/build-script-build`
18391839
[RUNNING] `rustc --crate-name foo [..]lib.rs [..]--crate-type lib \
18401840
--emit=[..]link[..]-C debuginfo=2 [..]\
18411841
-C metadata=[..] \
1842-
--artifact-dir [..] \
1842+
--out-dir [..] \
18431843
-L [..]target/debug/deps`
18441844
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
18451845
",

tests/testsuite/cross_compile.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ fn linker() {
406406
[RUNNING] `rustc --crate-name foo --edition=2015 src/foo.rs [..]--crate-type bin \
407407
--emit=[..]link[..]-C debuginfo=2 [..]\
408408
-C metadata=[..] \
409-
--artifact-dir [CWD]/target/{target}/debug/deps \
409+
--out-dir [CWD]/target/{target}/debug/deps \
410410
--target {target} \
411411
-C linker=my-linker-tool \
412412
-L dependency=[CWD]/target/{target}/debug/deps \
@@ -662,7 +662,7 @@ fn cross_with_a_build_script() {
662662
.with_stderr(&format!(
663663
"\
664664
[COMPILING] foo v0.0.0 ([CWD])
665-
[RUNNING] `rustc [..] build.rs [..] --artifact-dir [CWD]/target/debug/build/foo-[..]`
665+
[RUNNING] `rustc [..] build.rs [..] --out-dir [CWD]/target/debug/build/foo-[..]`
666666
[RUNNING] `[CWD]/target/debug/build/foo-[..]/build-script-build`
667667
[RUNNING] `rustc [..] src/main.rs [..] --target {target} [..]`
668668
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
@@ -762,7 +762,7 @@ fn build_script_needed_for_host_and_target() {
762762
.arg(&target)
763763
.with_stderr_contains(&"[COMPILING] d1 v0.0.0 ([CWD]/d1)")
764764
.with_stderr_contains(
765-
"[RUNNING] `rustc [..] d1/build.rs [..] --artifact-dir [CWD]/target/debug/build/d1-[..]`",
765+
"[RUNNING] `rustc [..] d1/build.rs [..] --out-dir [CWD]/target/debug/build/d1-[..]`",
766766
)
767767
.with_stderr_contains("[RUNNING] `[CWD]/target/debug/build/d1-[..]/build-script-build`")
768768
.with_stderr_contains("[RUNNING] `rustc [..] d1/src/lib.rs [..]`")
@@ -773,7 +773,7 @@ fn build_script_needed_for_host_and_target() {
773773
))
774774
.with_stderr_contains("[COMPILING] foo v0.0.0 ([CWD])")
775775
.with_stderr_contains(&format!(
776-
"[RUNNING] `rustc [..] build.rs [..] --artifact-dir [CWD]/target/debug/build/foo-[..] \
776+
"[RUNNING] `rustc [..] build.rs [..] --out-dir [CWD]/target/debug/build/foo-[..] \
777777
-L /path/to/{host}`",
778778
host = host
779779
))

tests/testsuite/freshness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ fn dirty_both_lib_and_test() {
17731773
Command::new(rustc)
17741774
.args(&[
17751775
"--crate-type=staticlib",
1776-
"--artifact-dir",
1776+
"--out-dir",
17771777
out_dir.to_str().unwrap(),
17781778
"slib.rs"
17791779
])

tests/testsuite/profiles.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn profile_overrides() {
3535
-C debug-assertions=on[..] \
3636
-C metadata=[..] \
3737
-C rpath \
38-
--artifact-dir [..] \
38+
--out-dir [..] \
3939
-L dependency=[CWD]/target/debug/deps`
4040
[FINISHED] `dev` profile [optimized] target(s) in [..]
4141
",
@@ -70,7 +70,7 @@ fn opt_level_override_0() {
7070
--emit=[..]link[..]\
7171
-C debuginfo=2 [..]\
7272
-C metadata=[..] \
73-
--artifact-dir [..] \
73+
--out-dir [..] \
7474
-L dependency=[CWD]/target/debug/deps`
7575
[FINISHED] [..] target(s) in [..]
7676
",
@@ -104,7 +104,7 @@ fn debug_override_1() {
104104
--emit=[..]link[..]\
105105
-C debuginfo=1 [..]\
106106
-C metadata=[..] \
107-
--artifact-dir [..] \
107+
--out-dir [..] \
108108
-L dependency=[CWD]/target/debug/deps`
109109
[FINISHED] [..] target(s) in [..]
110110
",
@@ -143,7 +143,7 @@ fn check_opt_level_override(profile_level: &str, rustc_level: &str) {
143143
-C debuginfo=2 [..]\
144144
-C debug-assertions=on[..] \
145145
-C metadata=[..] \
146-
--artifact-dir [..] \
146+
--out-dir [..] \
147147
-L dependency=[CWD]/target/debug/deps`
148148
[FINISHED] [..] target(s) in [..]
149149
",
@@ -220,15 +220,15 @@ fn top_level_overrides_deps() {
220220
-C opt-level=1[..]\
221221
-C debuginfo=2 [..]\
222222
-C metadata=[..] \
223-
--artifact-dir [CWD]/target/release/deps \
223+
--out-dir [CWD]/target/release/deps \
224224
-L dependency=[CWD]/target/release/deps`
225225
[COMPILING] test v0.0.0 ([CWD])
226226
[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib \
227227
--emit=[..]link \
228228
-C opt-level=1[..]\
229229
-C debuginfo=2 [..]\
230230
-C metadata=[..] \
231-
--artifact-dir [..] \
231+
--out-dir [..] \
232232
-L dependency=[CWD]/target/release/deps \
233233
--extern foo=[CWD]/target/release/deps/\
234234
{prefix}foo[..]{suffix} \

tests/testsuite/run.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -798,15 +798,15 @@ fn example_with_release_flag() {
798798
--emit=[..]link \
799799
-C opt-level=3[..]\
800800
-C metadata=[..] \
801-
--artifact-dir [CWD]/target/release/deps \
801+
--out-dir [CWD]/target/release/deps \
802802
-C strip=debuginfo \
803803
-L dependency=[CWD]/target/release/deps`
804804
[COMPILING] foo v0.0.1 ([CWD])
805805
[RUNNING] `rustc --crate-name a --edition=2015 examples/a.rs [..]--crate-type bin \
806806
--emit=[..]link \
807807
-C opt-level=3[..]\
808808
-C metadata=[..] \
809-
--artifact-dir [CWD]/target/release/examples \
809+
--out-dir [CWD]/target/release/examples \
810810
-C strip=debuginfo \
811811
-L dependency=[CWD]/target/release/deps \
812812
--extern bar=[CWD]/target/release/deps/libbar-[..].rlib`
@@ -829,14 +829,14 @@ fast2",
829829
--emit=[..]link[..]\
830830
-C debuginfo=2 [..]\
831831
-C metadata=[..] \
832-
--artifact-dir [CWD]/target/debug/deps \
832+
--out-dir [CWD]/target/debug/deps \
833833
-L dependency=[CWD]/target/debug/deps`
834834
[COMPILING] foo v0.0.1 ([CWD])
835835
[RUNNING] `rustc --crate-name a --edition=2015 examples/a.rs [..]--crate-type bin \
836836
--emit=[..]link[..]\
837837
-C debuginfo=2 [..]\
838838
-C metadata=[..] \
839-
--artifact-dir [CWD]/target/debug/examples \
839+
--out-dir [CWD]/target/debug/examples \
840840
-L dependency=[CWD]/target/debug/deps \
841841
--extern bar=[CWD]/target/debug/deps/libbar-[..].rlib`
842842
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]

tests/testsuite/rustc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn build_lib_for_foo() {
2020
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \
2121
--emit=[..]link[..]-C debuginfo=2 [..]\
2222
-C metadata=[..] \
23-
--artifact-dir [..] \
23+
--out-dir [..] \
2424
-L dependency=[CWD]/target/debug/deps`
2525
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
2626
",
@@ -43,7 +43,7 @@ fn lib() {
4343
--emit=[..]link[..]-C debuginfo=2 [..]\
4444
-C debug-assertions=off[..]\
4545
-C metadata=[..] \
46-
--artifact-dir [..] \
46+
--out-dir [..] \
4747
-L dependency=[CWD]/target/debug/deps`
4848
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
4949
",
@@ -65,13 +65,13 @@ fn build_main_and_allow_unstable_options() {
6565
[RUNNING] `rustc --crate-name {name} --edition=2015 src/lib.rs [..]--crate-type lib \
6666
--emit=[..]link[..]-C debuginfo=2 [..]\
6767
-C metadata=[..] \
68-
--artifact-dir [..] \
68+
--out-dir [..] \
6969
-L dependency=[CWD]/target/debug/deps`
7070
[RUNNING] `rustc --crate-name {name} --edition=2015 src/main.rs [..]--crate-type bin \
7171
--emit=[..]link[..]-C debuginfo=2 [..]\
7272
-C debug-assertions[..]\
7373
-C metadata=[..] \
74-
--artifact-dir [..] \
74+
--out-dir [..] \
7575
-L dependency=[CWD]/target/debug/deps \
7676
--extern {name}=[CWD]/target/debug/deps/lib{name}-[..].rlib`
7777
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
@@ -110,7 +110,7 @@ fn build_with_args_to_one_of_multiple_binaries() {
110110
[COMPILING] foo v0.0.1 ([CWD])
111111
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]\
112112
-C debuginfo=2 [..]-C metadata=[..] \
113-
--artifact-dir [..]`
113+
--out-dir [..]`
114114
[RUNNING] `rustc --crate-name bar --edition=2015 src/bin/bar.rs [..]--crate-type bin --emit=[..]link[..]\
115115
-C debuginfo=2 [..]-C debug-assertions [..]`
116116
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
@@ -388,7 +388,7 @@ fn build_with_args_to_one_of_multiple_tests() {
388388
[COMPILING] foo v0.0.1 ([CWD])
389389
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]\
390390
-C debuginfo=2 [..]-C metadata=[..] \
391-
--artifact-dir [..]`
391+
--out-dir [..]`
392392
[RUNNING] `rustc --crate-name bar --edition=2015 tests/bar.rs [..]--emit=[..]link[..]-C debuginfo=2 [..]\
393393
-C debug-assertions [..]--test[..]`
394394
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]

0 commit comments

Comments
 (0)