From 6c0532b23bbfe48b11e08412850198c7beb51d26 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 8 Sep 2025 16:54:48 -0500 Subject: [PATCH] fix(shell): Switch to annotate snippets for warnings This is part of #15944 --- src/cargo/core/shell.rs | 5 +- tests/testsuite/alt_registry.rs | 6 +- tests/testsuite/bad_config.rs | 86 +++++++++--------- tests/testsuite/bench.rs | 30 +++---- tests/testsuite/build.rs | 6 +- tests/testsuite/build_script_env.rs | 6 +- .../testsuite/build_script_extra_link_arg.rs | 6 +- tests/testsuite/cargo_alias_config.rs | 12 +-- tests/testsuite/cargo_features.rs | 8 +- .../path_contains_separator/stderr.term.svg | 2 +- tests/testsuite/collisions.rs | 60 ++++++------- tests/testsuite/doc.rs | 40 ++++----- tests/testsuite/docscrape.rs | 20 ++--- tests/testsuite/features2.rs | 4 +- tests/testsuite/fix_n_times.rs | 2 +- tests/testsuite/git.rs | 14 +-- .../testsuite/inheritable_workspace_fields.rs | 12 +-- tests/testsuite/install.rs | 4 +- tests/testsuite/lints_table.rs | 14 +-- tests/testsuite/new.rs | 22 ++--- tests/testsuite/open_namespaces.rs | 2 +- tests/testsuite/package.rs | 56 ++++++------ tests/testsuite/patch.rs | 90 +++++++++---------- tests/testsuite/paths.rs | 56 ++++++------ tests/testsuite/profile_overrides.rs | 4 +- tests/testsuite/profiles.rs | 4 +- tests/testsuite/publish.rs | 76 ++++++++-------- tests/testsuite/publish_lockfile.rs | 4 +- tests/testsuite/registry.rs | 56 ++++++------ tests/testsuite/required_features.rs | 70 +++++++-------- tests/testsuite/run.rs | 28 +++--- tests/testsuite/script/cargo.rs | 4 +- tests/testsuite/source_replacement.rs | 2 +- tests/testsuite/workspaces.rs | 6 +- 34 files changed, 410 insertions(+), 407 deletions(-) diff --git a/src/cargo/core/shell.rs b/src/cargo/core/shell.rs index 77a3707f747..b8dffdad2ef 100644 --- a/src/cargo/core/shell.rs +++ b/src/cargo/core/shell.rs @@ -222,7 +222,10 @@ impl Shell { /// Prints an amber 'warning' message. pub fn warn(&mut self, message: T) -> CargoResult<()> { - self.print(&"warning", Some(&message), &WARN, false) + let report = &[annotate_snippets::Group::with_title( + annotate_snippets::Level::WARNING.secondary_title(message.to_string()), + )]; + self.print_report(report, false) } /// Prints a cyan 'note' message. diff --git a/tests/testsuite/alt_registry.rs b/tests/testsuite/alt_registry.rs index ab0ded2443a..2e321227b78 100644 --- a/tests/testsuite/alt_registry.rs +++ b/tests/testsuite/alt_registry.rs @@ -350,7 +350,7 @@ fn publish_with_registry_dependency() { .with_stderr_data(str![[r#" [UPDATING] `alternative` index [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [UPDATING] `alternative` index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -517,7 +517,7 @@ fn publish_to_alt_registry() { .with_stderr_data(str![[r#" [UPDATING] `alternative` index [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -595,7 +595,7 @@ fn publish_with_crates_io_dep() { .with_stderr_data(str![[r#" [UPDATING] `alternative` index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [UPDATING] `dummy-registry` index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index d8eec977ad0..6d20f12e66f 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -839,7 +839,7 @@ fn dev_dependencies2() { .build(); p.cargo("check").with_stderr_data(str![[r#" [WARNING] `dev_dependencies` is deprecated in favor of `dev-dependencies` and will not work in the 2024 edition -(in the `foo` package) + (in the `foo` package) [LOCKING] 1 package to latest compatible version [CHECKING] foo v0.1.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -954,7 +954,7 @@ fn build_dependencies2() { .build(); p.cargo("check").with_stderr_data(str![[r#" [WARNING] `build_dependencies` is deprecated in favor of `build-dependencies` and will not work in the 2024 edition -(in the `foo` package) + (in the `foo` package) [LOCKING] 1 package to latest compatible version [CHECKING] foo v0.1.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -1062,7 +1062,7 @@ fn lib_crate_type2() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] `crate_type` is deprecated in favor of `crate-type` and will not work in the 2024 edition -(in the `foo` library target) + (in the `foo` library target) [CHECKING] foo v0.5.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -1153,7 +1153,7 @@ fn bin_crate_type2() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] `crate_type` is deprecated in favor of `crate-type` and will not work in the 2024 edition -(in the `foo` binary target) + (in the `foo` binary target) [CHECKING] foo v0.5.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -1262,9 +1262,9 @@ fn examples_crate_type2() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] `crate_type` is deprecated in favor of `crate-type` and will not work in the 2024 edition -(in the `ex` example target) + (in the `ex` example target) [WARNING] `crate_type` is deprecated in favor of `crate-type` and will not work in the 2024 edition -(in the `goodbye` example target) + (in the `goodbye` example target) [CHECKING] foo v0.5.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -1401,7 +1401,7 @@ fn cargo_platform_build_dependencies2() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] `build_dependencies` is deprecated in favor of `build-dependencies` and will not work in the 2024 edition -(in the `[HOST_TARGET]` platform target) + (in the `[HOST_TARGET]` platform target) [LOCKING] 1 package to latest compatible version [COMPILING] build v0.5.0 ([ROOT]/foo/build) [COMPILING] foo v0.5.0 ([ROOT]/foo) @@ -1532,7 +1532,7 @@ fn cargo_platform_dev_dependencies2() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] `dev_dependencies` is deprecated in favor of `dev-dependencies` and will not work in the 2024 edition -(in the `[HOST_TARGET]` platform target) + (in the `[HOST_TARGET]` platform target) [LOCKING] 1 package to latest compatible version [CHECKING] foo v0.5.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -1661,7 +1661,7 @@ fn default_features2() { p.cargo("check").with_stderr_data(str![[r#" [WARNING] `default_features` is deprecated in favor of `default-features` and will not work in the 2024 edition -(in the `a` dependency) + (in the `a` dependency) [LOCKING] 1 package to latest compatible version [CHECKING] a v0.1.0 ([ROOT]/foo/a) [CHECKING] foo v0.1.0 ([ROOT]/foo) @@ -1836,7 +1836,7 @@ fn workspace_default_features2() { [CHECKING] workspace_only v0.1.0 ([ROOT]/foo/workspace_only) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [WARNING] [ROOT]/foo/workspace_only/Cargo.toml: `default_features` is deprecated in favor of `default-features` and will not work in the 2024 edition -(in the `dep_workspace_only` dependency) + (in the `dep_workspace_only` dependency) "#]] .unordered(), @@ -1947,7 +1947,7 @@ fn lib_proc_macro2() { foo.cargo("check") .with_stderr_data(str![[r#" [WARNING] `proc_macro` is deprecated in favor of `proc-macro` and will not work in the 2024 edition -(in the `foo` library target) + (in the `foo` library target) [CHECKING] foo v0.1.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -2035,7 +2035,7 @@ fn bin_proc_macro2() { foo.cargo("check") .with_stderr_data(str![[r#" [WARNING] `proc_macro` is deprecated in favor of `proc-macro` and will not work in the 2024 edition -(in the `foo` binary target) + (in the `foo` binary target) [CHECKING] foo v0.5.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -3473,22 +3473,22 @@ fn legacy_binary_paths_warnings() { p.cargo("check -v") .with_stderr_data(str![[r#" [WARNING] An explicit [[bin]] section is specified in Cargo.toml which currently -disables Cargo from automatically inferring other binary targets. -This inference behavior will change in the Rust 2018 edition and the following -files will be included as a binary target: - -* src/main.rs - -This is likely to break cargo build or cargo test as these files may not be -ready to be compiled as a binary target today. You can future-proof yourself -and disable this warning by adding `autobins = false` to your [package] -section. You may also move the files to a location where Cargo would not -automatically infer them to be a target, such as in subfolders. - -For more information on this warning you can consult -https://github.com/rust-lang/cargo/issues/5330 + disables Cargo from automatically inferring other binary targets. + This inference behavior will change in the Rust 2018 edition and the following + files will be included as a binary target: + + * src/main.rs + + This is likely to break cargo build or cargo test as these files may not be + ready to be compiled as a binary target today. You can future-proof yourself + and disable this warning by adding `autobins = false` to your [package] + section. You may also move the files to a location where Cargo would not + automatically infer them to be a target, such as in subfolders. + + For more information on this warning you can consult + https://github.com/rust-lang/cargo/issues/5330 [WARNING] path `src/main.rs` was erroneously implicitly accepted for binary `bar`, -please set bin.path in Cargo.toml + please set bin.path in Cargo.toml [CHECKING] foo v1.0.0 ([ROOT]/foo) [RUNNING] `rustc [..]` [RUNNING] `rustc [..]` @@ -3518,22 +3518,22 @@ please set bin.path in Cargo.toml p.cargo("check -v") .with_stderr_data(str![[r#" [WARNING] An explicit [[bin]] section is specified in Cargo.toml which currently -disables Cargo from automatically inferring other binary targets. -This inference behavior will change in the Rust 2018 edition and the following -files will be included as a binary target: - -* src/bin/main.rs - -This is likely to break cargo build or cargo test as these files may not be -ready to be compiled as a binary target today. You can future-proof yourself -and disable this warning by adding `autobins = false` to your [package] -section. You may also move the files to a location where Cargo would not -automatically infer them to be a target, such as in subfolders. - -For more information on this warning you can consult -https://github.com/rust-lang/cargo/issues/5330 + disables Cargo from automatically inferring other binary targets. + This inference behavior will change in the Rust 2018 edition and the following + files will be included as a binary target: + + * src/bin/main.rs + + This is likely to break cargo build or cargo test as these files may not be + ready to be compiled as a binary target today. You can future-proof yourself + and disable this warning by adding `autobins = false` to your [package] + section. You may also move the files to a location where Cargo would not + automatically infer them to be a target, such as in subfolders. + + For more information on this warning you can consult + https://github.com/rust-lang/cargo/issues/5330 [WARNING] path `src/bin/main.rs` was erroneously implicitly accepted for binary `bar`, -please set bin.path in Cargo.toml + please set bin.path in Cargo.toml [CHECKING] foo v1.0.0 ([ROOT]/foo) [RUNNING] `rustc [..]` [RUNNING] `rustc [..]` @@ -3562,7 +3562,7 @@ please set bin.path in Cargo.toml p.cargo("check -v") .with_stderr_data(str![[r#" [WARNING] path `src/bar.rs` was erroneously implicitly accepted for binary `bar`, -please set bin.path in Cargo.toml + please set bin.path in Cargo.toml [CHECKING] foo v1.0.0 ([ROOT]/foo) [RUNNING] `rustc [..]` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s diff --git a/tests/testsuite/bench.rs b/tests/testsuite/bench.rs index a11822a5e3c..a0c19f8a5fc 100644 --- a/tests/testsuite/bench.rs +++ b/tests/testsuite/bench.rs @@ -716,20 +716,20 @@ fn bench_autodiscover_2015() { p.cargo("bench bench_basic") .with_stderr_data(str![[r#" [WARNING] An explicit [[bench]] section is specified in Cargo.toml which currently -disables Cargo from automatically inferring other benchmark targets. -This inference behavior will change in the Rust 2018 edition and the following -files will be included as a benchmark target: - -* [..]bench_basic.rs - -This is likely to break cargo build or cargo test as these files may not be -ready to be compiled as a benchmark target today. You can future-proof yourself -and disable this warning by adding `autobenches = false` to your [package] -section. You may also move the files to a location where Cargo would not -automatically infer them to be a target, such as in subfolders. - -For more information on this warning you can consult -https://github.com/rust-lang/cargo/issues/5330 + disables Cargo from automatically inferring other benchmark targets. + This inference behavior will change in the Rust 2018 edition and the following + files will be included as a benchmark target: + + * benches/bench_basic.rs + + This is likely to break cargo build or cargo test as these files may not be + ready to be compiled as a benchmark target today. You can future-proof yourself + and disable this warning by adding `autobenches = false` to your [package] + section. You may also move the files to a location where Cargo would not + automatically infer them to be a target, such as in subfolders. + + For more information on this warning you can consult + https://github.com/rust-lang/cargo/issues/5330 [COMPILING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `bench` profile [optimized] target(s) in [ELAPSED]s [RUNNING] [..] (target/release/deps/foo-[HASH][EXE]) @@ -1944,7 +1944,7 @@ fn legacy_bench_name() { p.cargo("bench") .with_stderr_data(str![[r#" [WARNING] path `src/bench.rs` was erroneously implicitly accepted for benchmark `bench`, -please set bench.path in Cargo.toml + please set bench.path in Cargo.toml [COMPILING] foo v0.1.0 ([ROOT]/foo) [FINISHED] `bench` profile [optimized] target(s) in [ELAPSED]s [RUNNING] unittests src/lib.rs (target/release/deps/foo-[HASH][EXE]) diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 68a3a037911..950bc2ff459 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -471,8 +471,8 @@ fn cargo_compile_duplicate_build_targets() { p.cargo("build") .with_stderr_data(str![[r#" [WARNING] file `[ROOT]/foo/src/main.rs` found to be present in multiple build targets: - * `lib` target `main` - * `bin` target `foo` + * `lib` target `main` + * `bin` target `foo` [COMPILING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -1992,7 +1992,7 @@ fn many_crate_types_old_style_lib_location() { p.cargo("build") .with_stderr_data(str![[r#" [WARNING] path `src/foo.rs` was erroneously implicitly accepted for library `foo`, -please rename the file to `src/lib.rs` or set lib.path in Cargo.toml + please rename the file to `src/lib.rs` or set lib.path in Cargo.toml [COMPILING] foo v0.5.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s diff --git a/tests/testsuite/build_script_env.rs b/tests/testsuite/build_script_env.rs index 15d3a671535..aee2c9d0d54 100644 --- a/tests/testsuite/build_script_env.rs +++ b/tests/testsuite/build_script_env.rs @@ -145,7 +145,7 @@ fn rustc_bootstrap() { .with_stderr_data(str![[r#" [COMPILING] has-dashes v0.0.1 ([ROOT]/foo) [WARNING] has-dashes@0.0.1: Cannot set `RUSTC_BOOTSTRAP=1` from build script of `has-dashes v0.0.1 ([ROOT]/foo)`. -[NOTE] Crates cannot set `RUSTC_BOOTSTRAP` themselves, as doing so would subvert the stability guarantees of Rust for your project. + [NOTE] Crates cannot set `RUSTC_BOOTSTRAP` themselves, as doing so would subvert the stability guarantees of Rust for your project. [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) @@ -155,7 +155,7 @@ fn rustc_bootstrap() { .env("RUSTC_BOOTSTRAP", "has_dashes") .with_stderr_data(str![[r#" [WARNING] has-dashes@0.0.1: Cannot set `RUSTC_BOOTSTRAP=1` from build script of `has-dashes v0.0.1 ([ROOT]/foo)`. -[NOTE] Crates cannot set `RUSTC_BOOTSTRAP` themselves, as doing so would subvert the stability guarantees of Rust for your project. + [NOTE] Crates cannot set `RUSTC_BOOTSTRAP` themselves, as doing so would subvert the stability guarantees of Rust for your project. [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) @@ -190,7 +190,7 @@ fn rustc_bootstrap() { .with_stderr_data(str![[r#" [COMPILING] foo v0.0.1 ([ROOT]/foo) [WARNING] foo@0.0.1: Cannot set `RUSTC_BOOTSTRAP=1` from build script of `foo v0.0.1 ([ROOT]/foo)`. -[NOTE] Crates cannot set `RUSTC_BOOTSTRAP` themselves, as doing so would subvert the stability guarantees of Rust for your project. + [NOTE] Crates cannot set `RUSTC_BOOTSTRAP` themselves, as doing so would subvert the stability guarantees of Rust for your project. [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) diff --git a/tests/testsuite/build_script_extra_link_arg.rs b/tests/testsuite/build_script_extra_link_arg.rs index 5273d1a081f..3a513b82691 100644 --- a/tests/testsuite/build_script_extra_link_arg.rs +++ b/tests/testsuite/build_script_extra_link_arg.rs @@ -222,9 +222,9 @@ fn cdylib_link_arg_transitive() { [RUNNING] `[ROOT]/foo/target/debug/build/bar-[HASH]/build-script-build` [WARNING] bar@1.0.0: cargo::rustc-link-arg-cdylib was specified in the build script of bar v1.0.0 \ ([ROOT]/foo/bar), but that package does not contain a cdylib target - -Allowing this was an unintended change in the 1.50 release, and may become an error in \ -the future. For more information, see . + + Allowing this was an unintended change in the 1.50 release, and may become an error in \ + the future. For more information, see . [RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..] [COMPILING] foo v0.1.0 ([ROOT]/foo) [RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]-C link-arg=--bogus[..]` diff --git a/tests/testsuite/cargo_alias_config.rs b/tests/testsuite/cargo_alias_config.rs index 044a5a28a9e..06346b17eb6 100644 --- a/tests/testsuite/cargo_alias_config.rs +++ b/tests/testsuite/cargo_alias_config.rs @@ -191,8 +191,8 @@ fn alias_shadowing_external_subcommand() { .env("PATH", &path) .with_stderr_data(str![[r#" [WARNING] user-defined alias `echo` is shadowing an external subcommand found at: `[ROOT]/cargo-echo/target/debug/cargo-echo[EXE]` -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #10049 . + This was previously accepted but is being phased out; it will become a hard error in a future release. + For more information, see issue #10049 . [COMPILING] foo v0.5.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -226,8 +226,8 @@ fn default_args_alias() { .with_status(101) .with_stderr_data(str![[r#" [WARNING] user-defined alias `echo` is shadowing an external subcommand found at: `[ROOT]/cargo-echo/target/debug/cargo-echo[EXE]` -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #10049 . + This was previously accepted but is being phased out; it will become a hard error in a future release. + For more information, see issue #10049 . [ERROR] alias echo has unresolvable recursive definition: echo -> echo "#]]) @@ -238,8 +238,8 @@ For more information, see issue #10049 . + This was previously accepted but is being phased out; it will become a hard error in a future release. + For more information, see issue #10049 . [ERROR] alias test-1 has unresolvable recursive definition: test-1 -> echo -> echo "#]]) diff --git a/tests/testsuite/cargo_features.rs b/tests/testsuite/cargo_features.rs index b5af3381ac7..f7c556b94fc 100644 --- a/tests/testsuite/cargo_features.rs +++ b/tests/testsuite/cargo_features.rs @@ -263,7 +263,7 @@ fn stable_feature_warns() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] the cargo feature `test-dummy-stable` has been stabilized in the 1.0 release and is no longer necessary to be listed in the manifest - See https://doc.rust-lang.org/cargo/ for more information about using this feature. + See https://doc.rust-lang.org/cargo/ for more information about using this feature. [CHECKING] a v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -699,7 +699,7 @@ fn publish_allowed() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] a v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] a v0.0.1 ([ROOT]/foo) @@ -752,8 +752,8 @@ fn z_stabilized() { .masquerade_as_nightly_cargo(&["always_nightly"]) .with_stderr_data(str![[r#" [WARNING] flag `-Z cache-messages` has been stabilized in the 1.40 release, and is no longer necessary - Message caching is now always enabled. - + Message caching is now always enabled. + [CHECKING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s diff --git a/tests/testsuite/cargo_init/path_contains_separator/stderr.term.svg b/tests/testsuite/cargo_init/path_contains_separator/stderr.term.svg index f197017d591..e164d8e1cfc 100644 --- a/tests/testsuite/cargo_init/path_contains_separator/stderr.term.svg +++ b/tests/testsuite/cargo_init/path_contains_separator/stderr.term.svg @@ -23,7 +23,7 @@ warning: the path `[ROOT]/case/test:ing/.` contains invalid PATH characters (usually `:`, `;`, or `"`) - It is recommended to use a different name to avoid problems. + It is recommended to use a different name to avoid problems. note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/tests/testsuite/collisions.rs b/tests/testsuite/collisions.rs index 2062913c239..545bee9f700 100644 --- a/tests/testsuite/collisions.rs +++ b/tests/testsuite/collisions.rs @@ -56,11 +56,11 @@ fn collision_dylib() { .with_stderr_data(&format!("\ ... [WARNING] output filename collision. -The lib target `a` in package `b v1.0.0 ([ROOT]/foo/b)` has the same output filename as the lib target `a` in package `a v1.0.0 ([ROOT]/foo/a)`. -Colliding filename is: [ROOT]/foo/target/debug/deps/{}a{} -The targets should have unique names. -Consider changing their names to be unique or compiling them separately. -This may become a hard error in the future; see . + The lib target `a` in package `b v1.0.0 ([ROOT]/foo/b)` has the same output filename as the lib target `a` in package `a v1.0.0 ([ROOT]/foo/a)`. + Colliding filename is: [ROOT]/foo/target/debug/deps/{}a{} + The targets should have unique names. + Consider changing their names to be unique or compiling them separately. + This may become a hard error in the future; see . ... ", env::consts::DLL_PREFIX, env::consts::DLL_SUFFIX)) .run(); @@ -89,11 +89,11 @@ fn collision_example() { .with_stderr_data(str![[r#" ... [WARNING] output filename collision. -The example target `ex1` in package `b v1.0.0 ([ROOT]/foo/b)` has the same output filename as the example target `ex1` in package `a v1.0.0 ([ROOT]/foo/a)`. -Colliding filename is: [ROOT]/foo/target/debug/examples/ex1[EXE] -The targets should have unique names. -Consider changing their names to be unique or compiling them separately. -This may become a hard error in the future; see . + The example target `ex1` in package `b v1.0.0 ([ROOT]/foo/b)` has the same output filename as the example target `ex1` in package `a v1.0.0 ([ROOT]/foo/a)`. + Colliding filename is: [ROOT]/foo/target/debug/examples/ex1 + The targets should have unique names. + Consider changing their names to be unique or compiling them separately. + This may become a hard error in the future; see . ... "#]]) @@ -120,11 +120,11 @@ fn collision_export() { .masquerade_as_nightly_cargo(&["artifact-dir"]) .with_stderr_data(str![[r#" [WARNING] `--artifact-dir` filename collision. -The example target `foo` in package `foo v1.0.0 ([ROOT]/foo)` has the same output filename as the bin target `foo` in package `foo v1.0.0 ([ROOT]/foo)`. -Colliding filename is: [ROOT]/foo/out/foo[EXE] -The exported filenames should be unique. -Consider changing their names to be unique or compiling them separately. -This may become a hard error in the future; see . + The example target `foo` in package `foo v1.0.0 ([ROOT]/foo)` has the same output filename as the bin target `foo` in package `foo v1.0.0 ([ROOT]/foo)`. + Colliding filename is: [ROOT]/foo/out/foo + The exported filenames should be unique. + Consider changing their names to be unique or compiling them separately. + This may become a hard error in the future; see . ... "#]]) @@ -166,11 +166,11 @@ fn collision_doc() { .with_stderr_data(str![[r#" ... [WARNING] output filename collision. -The lib target `foo` in package `foo2 v0.1.0 ([ROOT]/foo/foo2)` has the same output filename as the lib target `foo` in package `foo v0.1.0 ([ROOT]/foo)`. -Colliding filename is: [ROOT]/foo/target/doc/foo/index.html -The targets should have unique names. -This is a known bug where multiple crates with the same name use -the same path; see . + The lib target `foo` in package `foo2 v0.1.0 ([ROOT]/foo/foo2)` has the same output filename as the lib target `foo` in package `foo v0.1.0 ([ROOT]/foo)`. + Colliding filename is: [ROOT]/foo/target/doc/foo/index.html + The targets should have unique names. + This is a known bug where multiple crates with the same name use + the same path; see . ... "#]]) @@ -450,11 +450,11 @@ fn collision_doc_sources() { [DOWNLOADING] crates ... [DOWNLOADED] bar v1.0.0 (registry `dummy-registry`) [WARNING] output filename collision. -The lib target `bar` in package `bar v1.0.0` has the same output filename as the lib target `bar` in package `bar v1.0.0 ([ROOT]/foo/bar)`. -Colliding filename is: [ROOT]/foo/target/doc/bar/index.html -The targets should have unique names. -This is a known bug where multiple crates with the same name use -the same path; see . + The lib target `bar` in package `bar v1.0.0` has the same output filename as the lib target `bar` in package `bar v1.0.0 ([ROOT]/foo/bar)`. + Colliding filename is: [ROOT]/foo/target/doc/bar/index.html + The targets should have unique names. + This is a known bug where multiple crates with the same name use + the same path; see . [CHECKING] bar v1.0.0 ([ROOT]/foo/bar) [DOCUMENTING] bar v1.0.0 ([ROOT]/foo/bar) [DOCUMENTING] bar v1.0.0 @@ -577,11 +577,11 @@ fn collision_with_root() { [DOWNLOADING] crates ... [DOWNLOADED] foo-macro v1.0.0 (registry `dummy-registry`) [WARNING] output filename collision. -The lib target `foo_macro` in package `foo-macro v1.0.0` has the same output filename as the lib target `foo_macro` in package `foo-macro v1.0.0 ([ROOT]/foo/foo-macro)`. -Colliding filename is: [ROOT]/foo/target/doc/foo_macro/index.html -The targets should have unique names. -This is a known bug where multiple crates with the same name use -the same path; see . + The lib target `foo_macro` in package `foo-macro v1.0.0` has the same output filename as the lib target `foo_macro` in package `foo-macro v1.0.0 ([ROOT]/foo/foo-macro)`. + Colliding filename is: [ROOT]/foo/target/doc/foo_macro/index.html + The targets should have unique names. + This is a known bug where multiple crates with the same name use + the same path; see . [CHECKING] foo-macro v1.0.0 [DOCUMENTING] foo-macro v1.0.0 [CHECKING] abc v1.0.0 ([ROOT]/foo/abc) diff --git a/tests/testsuite/doc.rs b/tests/testsuite/doc.rs index bf5d6e309ea..00bb12a43e2 100644 --- a/tests/testsuite/doc.rs +++ b/tests/testsuite/doc.rs @@ -298,11 +298,11 @@ fn doc_multiple_targets_same_name() { p.cargo("doc --workspace") .with_stderr_data(str![[r#" [WARNING] output filename collision. -The bin target `foo_lib` in package `foo v0.1.0 ([ROOT]/foo/foo)` has the same output filename as the lib target `foo_lib` in package `bar v0.1.0 ([ROOT]/foo/bar)`. -Colliding filename is: [ROOT]/foo/target/doc/foo_lib/index.html -The targets should have unique names. -This is a known bug where multiple crates with the same name use -the same path; see . + The bin target `foo_lib` in package `foo v0.1.0 ([ROOT]/foo/foo)` has the same output filename as the lib target `foo_lib` in package `bar v0.1.0 ([ROOT]/foo/bar)`. + Colliding filename is: [ROOT]/foo/target/doc/foo_lib/index.html + The targets should have unique names. + This is a known bug where multiple crates with the same name use + the same path; see . [DOCUMENTING] bar v0.1.0 ([ROOT]/foo/bar) [DOCUMENTING] foo v0.1.0 ([ROOT]/foo/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -514,11 +514,11 @@ fn doc_lib_bin_same_name_documents_named_bin_when_requested() { // concurrently. .with_stderr_data(str![[r#" [WARNING] output filename collision. -The bin target `foo` in package `foo v0.0.1 ([ROOT]/foo)` has the same output filename as the lib target `foo` in package `foo v0.0.1 ([ROOT]/foo)`. -Colliding filename is: [ROOT]/foo/target/doc/foo/index.html -The targets should have unique names. -This is a known bug where multiple crates with the same name use -the same path; see . + The bin target `foo` in package `foo v0.0.1 ([ROOT]/foo)` has the same output filename as the lib target `foo` in package `foo v0.0.1 ([ROOT]/foo)`. + Colliding filename is: [ROOT]/foo/target/doc/foo/index.html + The targets should have unique names. + This is a known bug where multiple crates with the same name use + the same path; see . [CHECKING] foo v0.0.1 ([ROOT]/foo) [DOCUMENTING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -558,11 +558,11 @@ fn doc_lib_bin_same_name_documents_bins_when_requested() { // concurrently. .with_stderr_data(str![[r#" [WARNING] output filename collision. -The bin target `foo` in package `foo v0.0.1 ([ROOT]/foo)` has the same output filename as the lib target `foo` in package `foo v0.0.1 ([ROOT]/foo)`. -Colliding filename is: [ROOT]/foo/target/doc/foo/index.html -The targets should have unique names. -This is a known bug where multiple crates with the same name use -the same path; see . + The bin target `foo` in package `foo v0.0.1 ([ROOT]/foo)` has the same output filename as the lib target `foo` in package `foo v0.0.1 ([ROOT]/foo)`. + Colliding filename is: [ROOT]/foo/target/doc/foo/index.html + The targets should have unique names. + This is a known bug where multiple crates with the same name use + the same path; see . [CHECKING] foo v0.0.1 ([ROOT]/foo) [DOCUMENTING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -1409,11 +1409,11 @@ fn doc_all_member_dependency_same_name() { [DOWNLOADING] crates ... [DOWNLOADED] bar v0.1.0 (registry `dummy-registry`) [WARNING] output filename collision. -The lib target `bar` in package `bar v0.1.0` has the same output filename as the lib target `bar` in package `bar v0.1.0 ([ROOT]/foo/bar)`. -Colliding filename is: [ROOT]/foo/target/doc/bar/index.html -The targets should have unique names. -This is a known bug where multiple crates with the same name use -the same path; see . + The lib target `bar` in package `bar v0.1.0` has the same output filename as the lib target `bar` in package `bar v0.1.0 ([ROOT]/foo/bar)`. + Colliding filename is: [ROOT]/foo/target/doc/bar/index.html + The targets should have unique names. + This is a known bug where multiple crates with the same name use + the same path; see . [DOCUMENTING] bar v0.1.0 [CHECKING] bar v0.1.0 [DOCUMENTING] bar v0.1.0 ([ROOT]/foo/bar) diff --git a/tests/testsuite/docscrape.rs b/tests/testsuite/docscrape.rs index 49d50059813..7ba3ebbd443 100644 --- a/tests/testsuite/docscrape.rs +++ b/tests/testsuite/docscrape.rs @@ -448,16 +448,16 @@ fn no_fail_bad_lib() { [CHECKING] foo v0.0.1 ([ROOT]/foo) [SCRAPING] foo v0.0.1 ([ROOT]/foo) [WARNING] failed to check lib in package `foo` as a prerequisite for scraping examples from: example "ex", example "ex2" - Try running with `--verbose` to see the error message. - If an example should not be scanned, then consider adding `doc-scrape-examples = false` to its `[[example]]` definition in Cargo.toml + Try running with `--verbose` to see the error message. + If an example should not be scanned, then consider adding `doc-scrape-examples = false` to its `[[example]]` definition in Cargo.toml [WARNING] `foo` (lib) generated 1 warning [WARNING] failed to scan example "ex" in package `foo` for example code usage - Try running with `--verbose` to see the error message. - If an example should not be scanned, then consider adding `doc-scrape-examples = false` to its `[[example]]` definition in Cargo.toml + Try running with `--verbose` to see the error message. + If an example should not be scanned, then consider adding `doc-scrape-examples = false` to its `[[example]]` definition in Cargo.toml [WARNING] `foo` (example "ex") generated 1 warning [WARNING] failed to scan example "ex2" in package `foo` for example code usage - Try running with `--verbose` to see the error message. - If an example should not be scanned, then consider adding `doc-scrape-examples = false` to its `[[example]]` definition in Cargo.toml + Try running with `--verbose` to see the error message. + If an example should not be scanned, then consider adding `doc-scrape-examples = false` to its `[[example]]` definition in Cargo.toml [WARNING] `foo` (example "ex2") generated 1 warning [DOCUMENTING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -531,8 +531,8 @@ fn no_fail_bad_example() { [CHECKING] foo v0.0.1 ([ROOT]/foo) [SCRAPING] foo v0.0.1 ([ROOT]/foo) [WARNING] failed to scan example "ex1" in package `foo` for example code usage - Try running with `--verbose` to see the error message. - If an example should not be scanned, then consider adding `doc-scrape-examples = false` to its `[[example]]` definition in Cargo.toml + Try running with `--verbose` to see the error message. + If an example should not be scanned, then consider adding `doc-scrape-examples = false` to its `[[example]]` definition in Cargo.toml [WARNING] `foo` (example "ex1") generated 1 warning [DOCUMENTING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -614,8 +614,8 @@ fn no_scrape_with_dev_deps() { .with_stderr_data(str![[r#" [LOCKING] 1 package to latest compatible version [WARNING] Rustdoc did not scrape the following examples because they require dev-dependencies: ex - If you want Rustdoc to scrape these examples, then add `doc-scrape-examples = true` - to the [[example]] target configuration of at least one example. + If you want Rustdoc to scrape these examples, then add `doc-scrape-examples = true` + to the [[example]] target configuration of at least one example. [DOCUMENTING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [GENERATED] [ROOT]/foo/target/doc/foo/index.html diff --git a/tests/testsuite/features2.rs b/tests/testsuite/features2.rs index 08dd8dd4657..ecb0c71cdb7 100644 --- a/tests/testsuite/features2.rs +++ b/tests/testsuite/features2.rs @@ -1520,8 +1520,8 @@ fn resolver_ws_member() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] resolver for the non root package will be ignored, specify resolver at the workspace root: -package: [ROOT]/foo/a/Cargo.toml -workspace: [ROOT]/foo/Cargo.toml + package: [ROOT]/foo/a/Cargo.toml + workspace: [ROOT]/foo/Cargo.toml [CHECKING] a v0.1.0 ([ROOT]/foo/a) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s diff --git a/tests/testsuite/fix_n_times.rs b/tests/testsuite/fix_n_times.rs index 606cc80870c..dc6ab916ffc 100644 --- a/tests/testsuite/fix_n_times.rs +++ b/tests/testsuite/fix_n_times.rs @@ -328,7 +328,7 @@ fn fix_overlapping_max() { str![[r#" [CHECKING] foo v0.0.1 ([ROOT]/foo) [WARNING] error applying suggestions to `src/lib.rs` - + The full error message was: > cannot replace slice of data that was already replaced diff --git a/tests/testsuite/git.rs b/tests/testsuite/git.rs index c4a0dec7435..b4926522750 100644 --- a/tests/testsuite/git.rs +++ b/tests/testsuite/git.rs @@ -1184,9 +1184,9 @@ fn ambiguous_published_deps() { p.cargo("run") .with_stderr_data(str![[r#" [WARNING] skipping duplicate package `duplicate v0.5.0 ([ROOTURL]/dep#[..])`: - [ROOT]/home/.cargo/git/checkouts/dep-[HASH]/[..]/duplicate2/Cargo.toml -in favor of [ROOT]/home/.cargo/git/checkouts/dep-[HASH]/[..]/duplicate1/Cargo.toml - + [ROOT]/home/.cargo/git/checkouts/dep-[HASH]/94db8e9/duplicate2/Cargo.toml + in favor of [ROOT]/home/.cargo/git/checkouts/dep-[HASH]/94db8e9/duplicate1/Cargo.toml + [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [RUNNING] `target/debug/foo[EXE]` @@ -3159,7 +3159,7 @@ fn dirty_submodule() { .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] 2 files in the working directory contain changes that were not yet committed into git: .gitmodules @@ -3180,7 +3180,7 @@ to proceed despite this and include the uncommitted changes, pass the `--allow-d .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] 1 files in the working directory contain changes that were not yet committed into git: src/lib.rs @@ -3206,7 +3206,7 @@ to proceed despite this and include the uncommitted changes, pass the `--allow-d .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] 2 files in the working directory contain changes that were not yet committed into git: src/.gitmodules @@ -3229,7 +3229,7 @@ to proceed despite this and include the uncommitted changes, pass the `--allow-d .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] 1 files in the working directory contain changes that were not yet committed into git: src/bar/new_file.rs diff --git a/tests/testsuite/inheritable_workspace_fields.rs b/tests/testsuite/inheritable_workspace_fields.rs index 6da48e639d5..0bd9ebab7d6 100644 --- a/tests/testsuite/inheritable_workspace_fields.rs +++ b/tests/testsuite/inheritable_workspace_fields.rs @@ -324,7 +324,7 @@ fn inherit_own_dependencies() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] bar v0.2.0 ([ROOT]/foo) [UPDATING] crates.io index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -491,7 +491,7 @@ fn inherit_own_detailed_dependencies() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] bar v0.2.0 ([ROOT]/foo) [UPDATING] crates.io index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -755,9 +755,9 @@ fn inherit_workspace_fields() { [PACKAGED] 8 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] bar v1.2.3 ([ROOT]/foo/bar) [WARNING] only one of `license` or `license-file` is necessary -`license` should be used if the package license can be expressed with a standard SPDX expression. -`license-file` should be used if the package uses a non-standard license. -See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information. + `license` should be used if the package license can be expressed with a standard SPDX expression. + `license-file` should be used if the package uses a non-standard license. + See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information. [COMPILING] bar v1.2.3 ([ROOT]/foo/target/package/bar-1.2.3) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s [UPLOADING] bar v1.2.3 ([ROOT]/foo/bar) @@ -926,7 +926,7 @@ fn inherit_dependencies() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] bar v0.2.0 ([ROOT]/foo/bar) [UPDATING] crates.io index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index ae1a2d89d1e..25e5cd5bb3a 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -2260,8 +2260,8 @@ fn install_cargo_package_in_a_patched_workspace() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] patch for the non root package will be ignored, specify patch at the workspace root: -package: [ROOT]/foo/baz/Cargo.toml -workspace: [ROOT]/foo/Cargo.toml + package: [ROOT]/foo/baz/Cargo.toml + workspace: [ROOT]/foo/Cargo.toml ... "#]]) .run(); diff --git a/tests/testsuite/lints_table.rs b/tests/testsuite/lints_table.rs index f2d3202e890..11953265072 100644 --- a/tests/testsuite/lints_table.rs +++ b/tests/testsuite/lints_table.rs @@ -105,7 +105,7 @@ fn fail_on_invalid_tool() { foo.cargo("check").with_stderr_data(str![[r#" [WARNING] [ROOT]/foo/Cargo.toml: unrecognized lint tool `lints.super-awesome-linter`, specifying unrecognized tools may break in the future. -supported tools: cargo, clippy, rust, rustdoc + supported tools: cargo, clippy, rust, rustdoc [CHECKING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -755,10 +755,10 @@ authors = [] foo.cargo("check") .with_stderr_data(str![[r#" [WARNING] unused manifest key `lints.cargo` (may be supported in a future version) - -this Cargo does not support nightly features, but if you -switch to nightly channel you can pass -`-Zcargo-lints` to enable this feature. + + this Cargo does not support nightly features, but if you + switch to nightly channel you can pass + `-Zcargo-lints` to enable this feature. [CHECKING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s @@ -791,8 +791,8 @@ im-a-teapot = true .masquerade_as_nightly_cargo(&["cargo-lints", "test-dummy-unstable"]) .with_stderr_data(str![[r#" [WARNING] unused manifest key `lints.cargo` (may be supported in a future version) - -consider passing `-Zcargo-lints` to enable this feature. + + consider passing `-Zcargo-lints` to enable this feature. [CHECKING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s diff --git a/tests/testsuite/new.rs b/tests/testsuite/new.rs index 3ad2df17f42..6c75b219a4a 100644 --- a/tests/testsuite/new.rs +++ b/tests/testsuite/new.rs @@ -245,14 +245,14 @@ fn std_name() { cargo_process("new core").with_stderr_data(str![[r#" [CREATING] binary (application) `core` package [WARNING] the name `core` is part of Rust's standard library -It is recommended to use a different name to avoid problems. -If you need a package name to not match the directory name, consider using --name flag. -If you need a binary with the name "core", use a valid package name, and set the binary name to be different from the package. This can be done by setting the binary filename to `src/bin/core.rs` or change the name in Cargo.toml with: - - [[bin]] - name = "core" - path = "src/main.rs" - + It is recommended to use a different name to avoid problems. + If you need a package name to not match the directory name, consider using --name flag. + If you need a binary with the name "core", use a valid package name, and set the binary name to be different from the package. This can be done by setting the binary filename to `src/bin/core.rs` or change the name in Cargo.toml with: + + [[bin]] + name = "core" + path = "src/main.rs" + [NOTE] see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html "#]]).run(); @@ -450,7 +450,7 @@ If you need a package name to not match the directory name, consider using --nam cargo_process("new nul").with_stderr_data(str![[r#" [CREATING] binary (application) `nul` package [WARNING] the name `nul` is a reserved Windows filename -This package will not work on Windows platforms. + This package will not work on Windows platforms. [NOTE] see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html "#]]).run(); @@ -462,7 +462,7 @@ fn non_ascii_name() { cargo_process("new Привет").with_stderr_data(str![[r#" [CREATING] binary (application) `Привет` package [WARNING] the name `Привет` contains non-ASCII characters -Non-ASCII crate names are not supported by Rust. + Non-ASCII crate names are not supported by Rust. [WARNING] the name `Привет` is not snake_case or kebab-case which is recommended for package names, consider `привет` [NOTE] see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -579,7 +579,7 @@ fn path_with_invalid_character() { .with_stderr_data(str![[r#" [CREATING] binary (application) `testing` package [WARNING] the path `[ROOT]/test:ing` contains invalid PATH characters (usually `:`, `;`, or `"`) -It is recommended to use a different name to avoid problems. + It is recommended to use a different name to avoid problems. [NOTE] see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html "#]]) diff --git a/tests/testsuite/open_namespaces.rs b/tests/testsuite/open_namespaces.rs index 3914a2af77f..d529a1a4a90 100644 --- a/tests/testsuite/open_namespaces.rs +++ b/tests/testsuite/open_namespaces.rs @@ -448,7 +448,7 @@ fn publish_namespaced() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo::bar v0.0.1 ([ROOT]/foo) [ERROR] failed to prepare local package for uploading diff --git a/tests/testsuite/package.rs b/tests/testsuite/package.rs index 69f85846a55..9694645423d 100644 --- a/tests/testsuite/package.rs +++ b/tests/testsuite/package.rs @@ -37,7 +37,7 @@ fn simple() { p.cargo("package") .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -59,7 +59,7 @@ src/main.rs p.cargo("package") .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -90,7 +90,7 @@ fn metadata_warning() { p.cargo("package") .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -117,7 +117,7 @@ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for p.cargo("package") .with_stderr_data(str![[r#" [WARNING] manifest has no description, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -171,7 +171,7 @@ fn package_verbose() { .cwd(repo.root()) .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/all) [ARCHIVING] .cargo_vcs_info.json [ARCHIVING] Cargo.lock @@ -211,7 +211,7 @@ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for .cwd(repo.root().join("a/a")) .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] a v0.0.1 ([ROOT]/all/a/a) [ARCHIVING] .cargo_vcs_info.json [ARCHIVING] Cargo.lock @@ -254,7 +254,7 @@ fn package_verification() { p.cargo("package") .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -368,7 +368,7 @@ fn path_dependency_no_version() { .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] failed to verify manifest at `[ROOT]/foo/Cargo.toml` Caused by: @@ -408,7 +408,7 @@ fn git_dependency_no_version() { .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] failed to verify manifest at `[ROOT]/foo/Cargo.toml` Caused by: @@ -496,7 +496,7 @@ fn exclude() { .with_stdout_data("") .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/exclude) [ARCHIVING] .cargo_vcs_info.json [ARCHIVING] Cargo.lock @@ -570,7 +570,7 @@ fn include() { .cwd(repo.root()) .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [WARNING] both package.include and package.exclude are specified; the exclude list will be ignored [PACKAGING] foo v0.0.1 ([ROOT]/include) [ARCHIVING] .cargo_vcs_info.json @@ -786,7 +786,7 @@ fn package_weird_characters() { .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] cannot package a filename with a special character `:`: src/:foo "#]]) @@ -808,7 +808,7 @@ fn repackage_on_source_change() { p.cargo("package") .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 5 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -1854,7 +1854,7 @@ fn package_should_use_build_cache() { p.cargo("package") .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [UPDATING] `dummy-registry` index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -2612,7 +2612,7 @@ fn empty_license_file_path() { .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no license or license-file. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] license-file `` does not appear to exist (relative to `[ROOT]/foo`). Please update the license-file setting in the manifest at `[ROOT]/foo/Cargo.toml`. @@ -3298,11 +3298,11 @@ fn in_workspace() { p.cargo("package --workspace") .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] bar v0.0.1 ([ROOT]/foo/bar) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] bar v0.0.1 ([ROOT]/foo/bar) @@ -4025,7 +4025,7 @@ fn mixed_case() { p.cargo("package") .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -4047,7 +4047,7 @@ src/main.rs p.cargo("package") .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -4084,7 +4084,7 @@ fn versionless_package() { p.cargo("package") .with_stderr_data(str![[r#" [WARNING] manifest has no license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.0 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.0 ([ROOT]/foo) @@ -4236,7 +4236,7 @@ fn build_script_outside_pkg_root() { .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] the source file of build script doesn't appear to exist. This may cause issue during packaging, as modules resolution and resources included via macros are often relative to the path of source files. Please update the `build` setting in the manifest at `[ROOT]/foo/Cargo.toml` and point to a path inside the root of the package. @@ -4252,7 +4252,7 @@ Please update the `build` setting in the manifest at `[ROOT]/foo/Cargo.toml` and .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] the source file of build script doesn't appear to be a path inside of the package. It is at `[ROOT]/t_custom_build/custom_build.rs`, whereas the root the package is `[ROOT]/foo`. This may cause issue during packaging, as modules resolution and resources included via macros are often relative to the path of source files. @@ -4286,7 +4286,7 @@ fn symlink_manifest_path() { .arg(foo_symlink.join("Cargo.toml")) .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v1.0.0 ([ROOT]/foo-symlink) [PACKAGED] 6 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -5882,11 +5882,11 @@ fn workspace_with_local_dev_deps() { .with_stdout_data("") .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] dev_dep v0.0.1 ([ROOT]/foo/dev_dep) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] main v0.0.1 ([ROOT]/foo/main) [UPDATING] crates.io index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -7355,7 +7355,7 @@ fn in_package_workspace_with_members_with_features_old() { p.cargo("package -p li --no-verify") .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] li v0.0.1 ([ROOT]/foo/li) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -7450,7 +7450,7 @@ fn git_core_symlinks_false() { p.cargo("package --allow-dirty") .with_stderr_data(str![[r#" [WARNING] found symbolic links that may be checked out as regular files for git repo at `[ROOT]/foo/` -This might cause the `.crate` file to include incorrect or incomplete files + This might cause the `.crate` file to include incorrect or incomplete files [NOTE] to avoid this, set the Git config `core.symlinks` to `true` ... [PACKAGING] bar v0.0.0 ([ROOT]/foo) @@ -7682,7 +7682,7 @@ fn checksum_changed() { .with_status(101) .with_stderr_data(str![[r#" [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] dep v1.0.0 ([ROOT]/foo/dep) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [PACKAGING] foo v0.0.1 ([ROOT]/foo) diff --git a/tests/testsuite/patch.rs b/tests/testsuite/patch.rs index d65235db4f3..2e4d1ef976d 100644 --- a/tests/testsuite/patch.rs +++ b/tests/testsuite/patch.rs @@ -387,10 +387,10 @@ fn unused() { .with_stderr_data(str![[r#" [UPDATING] `dummy-registry` index [WARNING] Patch `bar v0.2.0 ([ROOT]/foo/bar)` was not used in the crate graph. -Check that the patched package version and available features are compatible -with the dependency requirements. If the patch has a different version from -what is locked in the Cargo.lock file, run `cargo update` to use the new -version. This may also occur with an optional dependency that is not enabled. + Check that the patched package version and available features are compatible + with the dependency requirements. If the patch has a different version from + what is locked in the Cargo.lock file, run `cargo update` to use the new + version. This may also occur with an optional dependency that is not enabled. [LOCKING] 1 package to latest compatible version [ADDING] bar v0.1.0 (available: v0.2.0) [DOWNLOADING] crates ... @@ -404,10 +404,10 @@ version. This may also occur with an optional dependency that is not enabled. p.cargo("check") .with_stderr_data(str![[r#" [WARNING] Patch `bar v0.2.0 ([ROOT]/foo/bar)` was not used in the crate graph. -Check that the patched package version and available features are compatible -with the dependency requirements. If the patch has a different version from -what is locked in the Cargo.lock file, run `cargo update` to use the new -version. This may also occur with an optional dependency that is not enabled. + Check that the patched package version and available features are compatible + with the dependency requirements. If the patch has a different version from + what is locked in the Cargo.lock file, run `cargo update` to use the new + version. This may also occur with an optional dependency that is not enabled. [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) @@ -460,14 +460,14 @@ fn unused_with_mismatch_source_being_patched() { .with_stderr_data(str![[r#" [UPDATING] `dummy-registry` index [WARNING] Patch `bar v0.2.0 ([ROOT]/foo/bar)` was not used in the crate graph. -Perhaps you misspelled the source URL being patched. -Possible URLs for `[patch.]`: - crates-io + Perhaps you misspelled the source URL being patched. + Possible URLs for `[patch.]`: + crates-io [WARNING] Patch `bar v0.3.0 ([ROOT]/foo/baz)` was not used in the crate graph. -Check that the patched package version and available features are compatible -with the dependency requirements. If the patch has a different version from -what is locked in the Cargo.lock file, run `cargo update` to use the new -version. This may also occur with an optional dependency that is not enabled. + Check that the patched package version and available features are compatible + with the dependency requirements. If the patch has a different version from + what is locked in the Cargo.lock file, run `cargo update` to use the new + version. This may also occur with an optional dependency that is not enabled. [LOCKING] 1 package to latest compatible version [ADDING] bar v0.1.0 (available: v0.3.0) [DOWNLOADING] crates ... @@ -563,10 +563,10 @@ fn unused_from_config() { .with_stderr_data(str![[r#" [UPDATING] `dummy-registry` index [WARNING] Patch `bar v0.2.0 ([ROOT]/foo/bar)` was not used in the crate graph. -Check that the patched package version and available features are compatible -with the dependency requirements. If the patch has a different version from -what is locked in the Cargo.lock file, run `cargo update` to use the new -version. This may also occur with an optional dependency that is not enabled. + Check that the patched package version and available features are compatible + with the dependency requirements. If the patch has a different version from + what is locked in the Cargo.lock file, run `cargo update` to use the new + version. This may also occur with an optional dependency that is not enabled. [LOCKING] 1 package to latest compatible version [ADDING] bar v0.1.0 (available: v0.2.0) [DOWNLOADING] crates ... @@ -580,10 +580,10 @@ version. This may also occur with an optional dependency that is not enabled. p.cargo("check") .with_stderr_data(str![[r#" [WARNING] Patch `bar v0.2.0 ([ROOT]/foo/bar)` was not used in the crate graph. -Check that the patched package version and available features are compatible -with the dependency requirements. If the patch has a different version from -what is locked in the Cargo.lock file, run `cargo update` to use the new -version. This may also occur with an optional dependency that is not enabled. + Check that the patched package version and available features are compatible + with the dependency requirements. If the patch has a different version from + what is locked in the Cargo.lock file, run `cargo update` to use the new + version. This may also occur with an optional dependency that is not enabled. [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) @@ -637,10 +637,10 @@ fn unused_git() { [UPDATING] git repository `[ROOTURL]/override` [UPDATING] `dummy-registry` index [WARNING] Patch `bar v0.2.0 ([ROOTURL]/override#[..])` was not used in the crate graph. -Check that the patched package version and available features are compatible -with the dependency requirements. If the patch has a different version from -what is locked in the Cargo.lock file, run `cargo update` to use the new -version. This may also occur with an optional dependency that is not enabled. + Check that the patched package version and available features are compatible + with the dependency requirements. If the patch has a different version from + what is locked in the Cargo.lock file, run `cargo update` to use the new + version. This may also occur with an optional dependency that is not enabled. [LOCKING] 1 package to latest compatible version [ADDING] bar v0.1.0 (available: v0.2.0) [DOWNLOADING] crates ... @@ -654,10 +654,10 @@ version. This may also occur with an optional dependency that is not enabled. p.cargo("check") .with_stderr_data(str![[r#" [WARNING] Patch `bar v0.2.0 ([ROOTURL]/override#[..])` was not used in the crate graph. -Check that the patched package version and available features are compatible -with the dependency requirements. If the patch has a different version from -what is locked in the Cargo.lock file, run `cargo update` to use the new -version. This may also occur with an optional dependency that is not enabled. + Check that the patched package version and available features are compatible + with the dependency requirements. If the patch has a different version from + what is locked in the Cargo.lock file, run `cargo update` to use the new + version. This may also occur with an optional dependency that is not enabled. [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) @@ -871,10 +871,10 @@ fn add_ignored_patch() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] Patch `bar v0.1.1 ([ROOT]/foo/bar)` was not used in the crate graph. -Check that the patched package version and available features are compatible -with the dependency requirements. If the patch has a different version from -what is locked in the Cargo.lock file, run `cargo update` to use the new -version. This may also occur with an optional dependency that is not enabled. + Check that the patched package version and available features are compatible + with the dependency requirements. If the patch has a different version from + what is locked in the Cargo.lock file, run `cargo update` to use the new + version. This may also occur with an optional dependency that is not enabled. [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) @@ -882,10 +882,10 @@ version. This may also occur with an optional dependency that is not enabled. p.cargo("check") .with_stderr_data(str![[r#" [WARNING] Patch `bar v0.1.1 ([ROOT]/foo/bar)` was not used in the crate graph. -Check that the patched package version and available features are compatible -with the dependency requirements. If the patch has a different version from -what is locked in the Cargo.lock file, run `cargo update` to use the new -version. This may also occur with an optional dependency that is not enabled. + Check that the patched package version and available features are compatible + with the dependency requirements. If the patch has a different version from + what is locked in the Cargo.lock file, run `cargo update` to use the new + version. This may also occur with an optional dependency that is not enabled. [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) @@ -1881,9 +1881,9 @@ fn two_semver_compatible() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] Patch `bar v0.1.1 ([ROOTURL]/override#[..])` was not used in the crate graph. -Perhaps you misspelled the source URL being patched. -Possible URLs for `[patch.]`: - [ROOT]/foo/bar + Perhaps you misspelled the source URL being patched. + Possible URLs for `[patch.]`: + [ROOT]/foo/bar [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) @@ -1937,9 +1937,9 @@ fn multipatch_select_big() { p.cargo("check") .with_stderr_data(str![[r#" [WARNING] Patch `bar v0.1.0 ([ROOTURL]/override#[..])` was not used in the crate graph. -Perhaps you misspelled the source URL being patched. -Possible URLs for `[patch.]`: - [ROOT]/foo/bar + Perhaps you misspelled the source URL being patched. + Possible URLs for `[patch.]`: + [ROOT]/foo/bar [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s "#]]) diff --git a/tests/testsuite/paths.rs b/tests/testsuite/paths.rs index 2fe242fc664..56bacca96b1 100644 --- a/tests/testsuite/paths.rs +++ b/tests/testsuite/paths.rs @@ -61,20 +61,20 @@ fn broken_path_override_warns() { [UPDATING] `dummy-registry` index [LOCKING] 2 packages to latest compatible versions [WARNING] path override for crate `a` has altered the original list of -dependencies; the dependency on `bar` was either added or -modified to not match the previously resolved version - -This is currently allowed but is known to produce buggy behavior with spurious -recompiles and changes to the crate graph. Path overrides unfortunately were -never intended to support this feature, so for now this message is just a -warning. In the future, however, this message will become a hard error. - -To change the dependency graph via an override it's recommended to use the -`[patch]` feature of Cargo instead of the path override feature. This is -documented online at the url below for more information. - -https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html - + dependencies; the dependency on `bar` was either added or + modified to not match the previously resolved version + + This is currently allowed but is known to produce buggy behavior with spurious + recompiles and changes to the crate graph. Path overrides unfortunately were + never intended to support this feature, so for now this message is just a + warning. In the future, however, this message will become a hard error. + + To change the dependency graph via an override it's recommended to use the + `[patch]` feature of Cargo instead of the path override feature. This is + documented online at the url below for more information. + + https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html + [DOWNLOADING] crates ... [DOWNLOADED] bar v0.2.0 (registry `dummy-registry`) [CHECKING] bar v0.2.0 @@ -229,20 +229,20 @@ fn paths_add_optional_bad() { .with_stderr_data(str![[r#" [LOCKING] 1 package to latest compatible version [WARNING] path override for crate `bar` has altered the original list of -dependencies; the dependency on `baz` was either added or -modified to not match the previously resolved version - -This is currently allowed but is known to produce buggy behavior with spurious -recompiles and changes to the crate graph. Path overrides unfortunately were -never intended to support this feature, so for now this message is just a -warning. In the future, however, this message will become a hard error. - -To change the dependency graph via an override it's recommended to use the -`[patch]` feature of Cargo instead of the path override feature. This is -documented online at the url below for more information. - -https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html - + dependencies; the dependency on `baz` was either added or + modified to not match the previously resolved version + + This is currently allowed but is known to produce buggy behavior with spurious + recompiles and changes to the crate graph. Path overrides unfortunately were + never intended to support this feature, so for now this message is just a + warning. In the future, however, this message will become a hard error. + + To change the dependency graph via an override it's recommended to use the + `[patch]` feature of Cargo instead of the path override feature. This is + documented online at the url below for more information. + + https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html + [CHECKING] bar v0.1.0 ([ROOT]/foo/bar2) [CHECKING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s diff --git a/tests/testsuite/profile_overrides.rs b/tests/testsuite/profile_overrides.rs index 650d040d7d7..7cbc69986eb 100644 --- a/tests/testsuite/profile_overrides.rs +++ b/tests/testsuite/profile_overrides.rs @@ -77,8 +77,8 @@ fn profile_override_warnings() { ... [WARNING] profile package spec `bar@1.2.3` in profile `dev` has a version or URL that does not match any of the packages: bar v0.5.0 ([ROOT]/foo/bar) [WARNING] profile package spec `bart` in profile `dev` did not match any packages - -[HELP] a package with a similar name exists: `bar` + + [HELP] a package with a similar name exists: `bar` [WARNING] profile package spec `no-suggestion` in profile `dev` did not match any packages [COMPILING] bar v0.5.0 ([ROOT]/foo/bar) [COMPILING] foo v0.0.1 ([ROOT]/foo) diff --git a/tests/testsuite/profiles.rs b/tests/testsuite/profiles.rs index 61cc8d2187a..ba9acea8963 100644 --- a/tests/testsuite/profiles.rs +++ b/tests/testsuite/profiles.rs @@ -258,8 +258,8 @@ fn profile_in_non_root_manifest_triggers_a_warning() { .cwd("bar") .with_stderr_data(str![[r#" [WARNING] profiles for the non root package will be ignored, specify profiles at the workspace root: -package: [ROOT]/foo/bar/Cargo.toml -workspace: [ROOT]/foo/Cargo.toml + package: [ROOT]/foo/bar/Cargo.toml + workspace: [ROOT]/foo/Cargo.toml [COMPILING] bar v0.1.0 ([ROOT]/foo/bar) [RUNNING] `rustc [..]` [FINISHED] `dev` profile [unoptimized] target(s) in [ELAPSED]s diff --git a/tests/testsuite/publish.rs b/tests/testsuite/publish.rs index c3da82a4aec..5d471815229 100644 --- a/tests/testsuite/publish.rs +++ b/tests/testsuite/publish.rs @@ -115,7 +115,7 @@ fn simple() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] foo v0.0.1 ([ROOT]/foo) @@ -157,7 +157,7 @@ fn duplicate_version() { [UPDATING] crates.io index [WARNING] crate foo@0.0.1 already exists on crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -209,7 +209,7 @@ fn simple_publish_with_http() { .with_stderr_data(str![[r#" [UPDATING] `dummy-registry` index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] foo v0.0.1 ([ROOT]/foo) @@ -252,7 +252,7 @@ fn simple_publish_with_asymmetric() { .with_stderr_data(str![[r#" [UPDATING] `dummy-registry` index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] foo v0.0.1 ([ROOT]/foo) @@ -308,7 +308,7 @@ or use environment variable CARGO_REGISTRY_TOKEN .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] foo v0.0.1 ([ROOT]/foo) @@ -353,7 +353,7 @@ fn simple_with_index() { .with_stderr_data(str![[r#" [UPDATING] `[ROOT]/registry` index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] foo v0.0.1 ([ROOT]/foo) @@ -782,7 +782,7 @@ fn dry_run() { .with_stderr_data(str![[r#" [UPDATING] `[ROOT]/registry` index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -1122,7 +1122,7 @@ The registry `alternative` is not listed in the `package.publish` value in Cargo .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -1173,7 +1173,7 @@ fn publish_with_select_features() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -1224,7 +1224,7 @@ fn publish_with_all_features() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -1336,7 +1336,7 @@ error[E0425]: cannot find function `newfunc` in crate `bar` .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [UPDATING] crates.io index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -1431,7 +1431,7 @@ or use environment variable CARGO_REGISTRY_TOKEN .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -1546,7 +1546,7 @@ fn publish_git_with_version() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.1.0 ([ROOT]/foo) [UPDATING] crates.io index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -2142,7 +2142,7 @@ fn credentials_ambiguous_filename() { [UPDATING] crates.io index [WARNING] both `[ROOT]/home/.cargo/credentials` and `[ROOT]/home/.cargo/credentials.toml` exist. Using `[ROOT]/home/.cargo/credentials` [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] foo v0.0.1 ([ROOT]/foo) @@ -2510,7 +2510,7 @@ fn in_package_workspace() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] li v0.0.1 ([ROOT]/foo/li) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] li v0.0.1 ([ROOT]/foo/li) @@ -2575,11 +2575,11 @@ fn with_duplicate_spec_in_members() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] bar v0.0.1 ([ROOT]/foo/bar) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] li v0.0.1 ([ROOT]/foo/li) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] bar v0.0.1 ([ROOT]/foo/bar) @@ -2631,7 +2631,7 @@ fn in_package_workspace_with_members_with_features_old() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] li v0.0.1 ([ROOT]/foo/li) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] li v0.0.1 ([ROOT]/foo/li) @@ -2678,7 +2678,7 @@ fn in_virtual_workspace() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] foo v0.0.1 ([ROOT]/foo/foo) @@ -2736,7 +2736,7 @@ fn in_virtual_workspace_with_p() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] li v0.0.1 ([ROOT]/foo/li) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] li v0.0.1 ([ROOT]/foo/li) @@ -2843,11 +2843,11 @@ fn in_package_workspace_found_multiple() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] li v0.0.1 ([ROOT]/foo/li) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] lii v0.0.1 ([ROOT]/foo/lii) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] li v0.0.1 ([ROOT]/foo/li) @@ -2931,7 +2931,7 @@ fn http_api_not_noop() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] foo v0.0.1 ([ROOT]/foo) @@ -3012,7 +3012,7 @@ fn wait_for_first_publish() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] delay v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] delay v0.0.1 ([ROOT]/foo) @@ -3105,7 +3105,7 @@ fn wait_for_first_publish_underscore() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] delay_with_underscore v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] delay_with_underscore v0.0.1 ([ROOT]/foo) @@ -3205,7 +3205,7 @@ fn wait_for_subsequent_publish() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] delay v0.0.2 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] delay v0.0.2 ([ROOT]/foo) @@ -3275,7 +3275,7 @@ fn skip_wait_for_publish() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] foo v0.0.1 ([ROOT]/foo) @@ -3323,7 +3323,7 @@ fn timeout_waiting_for_publish() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] delay v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] delay v0.0.1 ([ROOT]/foo) @@ -3414,15 +3414,15 @@ fn timeout_waiting_for_dependency_publish() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] dep v0.0.1 ([ROOT]/foo/dep) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] main v0.0.1 ([ROOT]/foo/main) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] other v0.0.1 ([ROOT]/foo/other) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] dep v0.0.1 ([ROOT]/foo/dep) @@ -3459,11 +3459,11 @@ fn package_selection() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] a v0.1.0 ([ROOT]/foo/a) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] b v0.1.0 ([ROOT]/foo/b) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] a v0.1.0 ([ROOT]/foo/a) @@ -3480,11 +3480,11 @@ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] a v0.1.0 ([ROOT]/foo/a) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] b v0.1.0 ([ROOT]/foo/b) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] a v0.1.0 ([ROOT]/foo/a) @@ -3501,7 +3501,7 @@ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] a v0.1.0 ([ROOT]/foo/a) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] a v0.1.0 ([ROOT]/foo/a) @@ -3547,7 +3547,7 @@ fn wait_for_git_publish() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] delay v0.0.2 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [UPLOADING] delay v0.0.2 ([ROOT]/foo) @@ -4379,7 +4379,7 @@ fn checksum_changed() { [UPDATING] crates.io index [WARNING] crate dep@1.0.0 already exists on crates.io index [WARNING] manifest has no description, license, license-file, documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] dep v1.0.0 ([ROOT]/foo/dep) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [PACKAGING] foo v0.0.1 ([ROOT]/foo) diff --git a/tests/testsuite/publish_lockfile.rs b/tests/testsuite/publish_lockfile.rs index 08868dccb13..817438640c4 100644 --- a/tests/testsuite/publish_lockfile.rs +++ b/tests/testsuite/publish_lockfile.rs @@ -548,12 +548,12 @@ fn use_workspace_root_lockfile() { p.cargo("package --workspace") .with_stderr_data(str![[r#" [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] bar v0.0.1 ([ROOT]/foo/bar) [UPDATING] `dummy-registry` index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) [VERIFYING] bar v0.0.1 ([ROOT]/foo/bar) diff --git a/tests/testsuite/registry.rs b/tests/testsuite/registry.rs index fe9a14755de..e62e0356dba 100644 --- a/tests/testsuite/registry.rs +++ b/tests/testsuite/registry.rs @@ -3574,8 +3574,8 @@ fn sparse_blocking_count() { [..] TRACE network::HttpRegistry::block_until_ready: 1 transfers pending [..] TRACE network::HttpRegistry::block_until_ready: 1 transfers pending [WARNING] spurious network error (3 tries remaining): failed to get successful HTTP response from `[..]/index/3/b/bar` ([..]), got 500 -body: -internal server error + body: + internal server error [LOCKING] 1 package to latest compatible version [DOWNLOADING] crates ... [DOWNLOADED] bar v0.0.1 (registry `dummy-registry`) @@ -3624,11 +3624,11 @@ fn sparse_retry_single() { p.cargo("check").with_stderr_data(str![[r#" [UPDATING] `dummy-registry` index [WARNING] spurious network error (3 tries remaining): failed to get successful HTTP response from `http://127.0.0.1:[..]/index/3/b/bar` (127.0.0.1), got 500 -body: -internal server error + body: + internal server error [WARNING] spurious network error (2 tries remaining): failed to get successful HTTP response from `http://127.0.0.1:[..]/index/3/b/bar` (127.0.0.1), got 500 -body: -internal server error + body: + internal server error [LOCKING] 1 package to latest compatible version [DOWNLOADING] crates ... [DOWNLOADED] bar v0.0.1 (registry `dummy-registry`) @@ -3697,8 +3697,8 @@ fn sparse_retry_multiple() { &mut expected, "[WARNING] spurious network error ({remain} {} remaining): \ failed to get successful HTTP response from \ - `http://127.0.0.1:[..]/{ab}/{cd}/{name}` (127.0.0.1), got 500\n\ - body:\n\ + `http://127.0.0.1:[..]/{ab}/{cd}/{name}` (127.0.0.1), got 500\n \ + body:\n \ internal server error\n", if remain != 1 { "tries" } else { "try" } ) @@ -3771,11 +3771,11 @@ fn dl_retry_single() { [LOCKING] 1 package to latest compatible version [DOWNLOADING] crates ... [WARNING] spurious network error (3 tries remaining): failed to get successful HTTP response from `http://127.0.0.1:[..]/dl/bar/1.0.0/download` (127.0.0.1), got 500 -body: -internal server error + body: + internal server error [WARNING] spurious network error (2 tries remaining): failed to get successful HTTP response from `http://127.0.0.1:[..]/dl/bar/1.0.0/download` (127.0.0.1), got 500 -body: -internal server error + body: + internal server error [DOWNLOADED] bar v1.0.0 (registry `dummy-registry`) "#]]).run(); @@ -3850,8 +3850,8 @@ fn dl_retry_multiple() { &mut expected, "[WARNING] spurious network error ({remain} {} remaining): \ failed to get successful HTTP response from \ - `http://127.0.0.1:[..]/dl/{name}/1.0.0/download` (127.0.0.1), got 500\n\ - body:\n\ + `http://127.0.0.1:[..]/dl/{name}/1.0.0/download` (127.0.0.1), got 500\n \ + body:\n \ internal server error\n", if remain != 1 { "tries" } else { "try" } ) @@ -3920,8 +3920,8 @@ fn retry_too_many_requests() { .with_stderr_data(str![[r#" [UPDATING] `dummy-registry` index [WARNING] spurious network error (3 tries remaining): failed to get successful HTTP response from `[..]/index/3/b/bar` ([..]), got 429 -body: -too many requests, try again in 1 seconds + body: + too many requests, try again in 1 seconds [LOCKING] 1 package to latest compatible version [DOWNLOADING] crates ... [DOWNLOADED] bar v0.0.1 (registry `dummy-registry`) @@ -4268,14 +4268,14 @@ fn debug_header_message_index() { .with_stderr_data(str![[r#" [UPDATING] `dummy-registry` index [WARNING] spurious network error (3 tries remaining): failed to get successful HTTP response from `http://127.0.0.1:[..]/index/3/b/bar` (127.0.0.1), got 503 -body: -Please slow down + body: + Please slow down [WARNING] spurious network error (2 tries remaining): failed to get successful HTTP response from `http://127.0.0.1:[..]/index/3/b/bar` (127.0.0.1), got 503 -body: -Please slow down + body: + Please slow down [WARNING] spurious network error (1 try remaining): failed to get successful HTTP response from `http://127.0.0.1:[..]/index/3/b/bar` (127.0.0.1), got 503 -body: -Please slow down + body: + Please slow down [ERROR] failed to get `bar` as a dependency of package `foo v0.1.0 ([ROOT]/foo)` Caused by: @@ -4333,14 +4333,14 @@ fn debug_header_message_dl() { [LOCKING] 1 package to latest compatible version [DOWNLOADING] crates ... [WARNING] spurious network error (3 tries remaining): failed to get successful HTTP response from `http://127.0.0.1:[..]/dl/bar/1.0.0/download` (127.0.0.1), got 503 -body: -Please slow down + body: + Please slow down [WARNING] spurious network error (2 tries remaining): failed to get successful HTTP response from `http://127.0.0.1:[..]/dl/bar/1.0.0/download` (127.0.0.1), got 503 -body: -Please slow down + body: + Please slow down [WARNING] spurious network error (1 try remaining): failed to get successful HTTP response from `http://127.0.0.1:[..]/dl/bar/1.0.0/download` (127.0.0.1), got 503 -body: -Please slow down + body: + Please slow down [ERROR] failed to download from `http://127.0.0.1:[..]/dl/bar/1.0.0/download` Caused by: diff --git a/tests/testsuite/required_features.rs b/tests/testsuite/required_features.rs index 8cab2a9a2a1..503b9a58754 100644 --- a/tests/testsuite/required_features.rs +++ b/tests/testsuite/required_features.rs @@ -749,9 +749,9 @@ fn install_default_features() { [INSTALLING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s [WARNING] none of the package's binaries are available for install using the selected features - bin "foo" requires the features: `a` - example "foo" requires the features: `a` -Consider enabling some of the needed features by passing, e.g., `--features="a"` + bin "foo" requires the features: `a` + example "foo" requires the features: `a` + Consider enabling some of the needed features by passing, e.g., `--features="a"` "#]]) .run(); @@ -903,11 +903,11 @@ fn install_multiple_required_features() { [INSTALLING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s [WARNING] none of the package's binaries are available for install using the selected features - bin "foo_1" requires the features: `b`, `c` - bin "foo_2" requires the features: `a` - example "foo_3" requires the features: `b`, `c` - example "foo_4" requires the features: `a` -Consider enabling some of the needed features by passing, e.g., `--features="b c"` + bin "foo_1" requires the features: `b`, `c` + bin "foo_2" requires the features: `a` + example "foo_3" requires the features: `b`, `c` + example "foo_4" requires the features: `a` + Consider enabling some of the needed features by passing, e.g., `--features="b c"` "#]]) .run(); @@ -917,11 +917,11 @@ Consider enabling some of the needed features by passing, e.g., `--features="b c [WARNING] target filter `bins` specified, but no targets matched; this is a no-op [FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s [WARNING] none of the package's binaries are available for install using the selected features - bin "foo_1" requires the features: `b`, `c` - bin "foo_2" requires the features: `a` - example "foo_3" requires the features: `b`, `c` - example "foo_4" requires the features: `a` -Consider enabling some of the needed features by passing, e.g., `--features="b c"` + bin "foo_1" requires the features: `b`, `c` + bin "foo_2" requires the features: `a` + example "foo_3" requires the features: `b`, `c` + example "foo_4" requires the features: `a` + Consider enabling some of the needed features by passing, e.g., `--features="b c"` "#]]) .run(); @@ -931,11 +931,11 @@ Consider enabling some of the needed features by passing, e.g., `--features="b c [WARNING] target filter `examples` specified, but no targets matched; this is a no-op [FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s [WARNING] none of the package's binaries are available for install using the selected features - bin "foo_1" requires the features: `b`, `c` - bin "foo_2" requires the features: `a` - example "foo_3" requires the features: `b`, `c` - example "foo_4" requires the features: `a` -Consider enabling some of the needed features by passing, e.g., `--features="b c"` + bin "foo_1" requires the features: `b`, `c` + bin "foo_2" requires the features: `a` + example "foo_3" requires the features: `b`, `c` + example "foo_4" requires the features: `a` + Consider enabling some of the needed features by passing, e.g., `--features="b c"` "#]]) .run(); @@ -945,11 +945,11 @@ Consider enabling some of the needed features by passing, e.g., `--features="b c [WARNING] target filters `bins`, `examples` specified, but no targets matched; this is a no-op [FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s [WARNING] none of the package's binaries are available for install using the selected features - bin "foo_1" requires the features: `b`, `c` - bin "foo_2" requires the features: `a` - example "foo_3" requires the features: `b`, `c` - example "foo_4" requires the features: `a` -Consider enabling some of the needed features by passing, e.g., `--features="b c"` + bin "foo_1" requires the features: `b`, `c` + bin "foo_2" requires the features: `a` + example "foo_3" requires the features: `b`, `c` + example "foo_4" requires the features: `a` + Consider enabling some of the needed features by passing, e.g., `--features="b c"` "#]]) .run(); @@ -1254,9 +1254,9 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured; 0 filtered out; fini [LOCKING] 1 package to latest compatible version [FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s [WARNING] none of the package's binaries are available for install using the selected features - bin "foo" requires the features: `bar/a` - example "foo" requires the features: `bar/a` -Consider enabling some of the needed features by passing, e.g., `--features="bar/a"` + bin "foo" requires the features: `bar/a` + example "foo" requires the features: `bar/a` + Consider enabling some of the needed features by passing, e.g., `--features="bar/a"` "#]]) .run(); @@ -1616,15 +1616,15 @@ fn truncated_install_warning_message() { [INSTALLING] foo v0.1.0 ([ROOT]/foo) [FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s [WARNING] none of the package's binaries are available for install using the selected features - bin "foo1" requires the features: `feature1`, `feature2`, `feature3` - bin "foo10" requires the features: `feature1`, `feature2`, `feature3`, `feature4`, `feature5` - bin "foo2" requires the features: `feature2` - bin "foo3" requires the features: `feature3` - bin "foo4" requires the features: `feature4`, `feature1` - bin "foo5" requires the features: `feature1`, `feature2`, `feature3`, `feature4`, `feature5` - bin "foo6" requires the features: `feature1`, `feature2`, `feature3`, `feature4`, `feature5` -4 more targets also requires features not enabled. See them in the Cargo.toml file. -Consider enabling some of the needed features by passing, e.g., `--features="feature1 feature2 feature3"` + bin "foo1" requires the features: `feature1`, `feature2`, `feature3` + bin "foo10" requires the features: `feature1`, `feature2`, `feature3`, `feature4`, `feature5` + bin "foo2" requires the features: `feature2` + bin "foo3" requires the features: `feature3` + bin "foo4" requires the features: `feature4`, `feature1` + bin "foo5" requires the features: `feature1`, `feature2`, `feature3`, `feature4`, `feature5` + bin "foo6" requires the features: `feature1`, `feature2`, `feature3`, `feature4`, `feature5` + 4 more targets also requires features not enabled. See them in the Cargo.toml file. + Consider enabling some of the needed features by passing, e.g., `--features="feature1 feature2 feature3"` "#]]).run(); } diff --git a/tests/testsuite/run.rs b/tests/testsuite/run.rs index 3ab373bd53b..3032962e96f 100644 --- a/tests/testsuite/run.rs +++ b/tests/testsuite/run.rs @@ -609,20 +609,20 @@ fn run_example_autodiscover_2015() { .with_status(101) .with_stderr_data(str![[r#" [WARNING] An explicit [[example]] section is specified in Cargo.toml which currently -disables Cargo from automatically inferring other example targets. -This inference behavior will change in the Rust 2018 edition and the following -files will be included as a example target: - -* examples/a.rs - -This is likely to break cargo build or cargo test as these files may not be -ready to be compiled as a example target today. You can future-proof yourself -and disable this warning by adding `autoexamples = false` to your [package] -section. You may also move the files to a location where Cargo would not -automatically infer them to be a target, such as in subfolders. - -For more information on this warning you can consult -https://github.com/rust-lang/cargo/issues/5330 + disables Cargo from automatically inferring other example targets. + This inference behavior will change in the Rust 2018 edition and the following + files will be included as a example target: + + * examples/a.rs + + This is likely to break cargo build or cargo test as these files may not be + ready to be compiled as a example target today. You can future-proof yourself + and disable this warning by adding `autoexamples = false` to your [package] + section. You may also move the files to a location where Cargo would not + automatically infer them to be a target, such as in subfolders. + + For more information on this warning you can consult + https://github.com/rust-lang/cargo/issues/5330 [ERROR] no example target named `a` in default-run packages [HELP] available example targets: do_magic diff --git a/tests/testsuite/script/cargo.rs b/tests/testsuite/script/cargo.rs index 41d548a076f..e2fc1326709 100644 --- a/tests/testsuite/script/cargo.rs +++ b/tests/testsuite/script/cargo.rs @@ -142,8 +142,8 @@ fn warn_when_plugin_masks_manifest_on_stable() { .with_stdout_data("") .with_stderr_data(str![[r#" [WARNING] external subcommand `echo.rs` has the appearance of a manifest-command -This was previously accepted but will be phased out when `-Zscript` is stabilized. -For more information, see issue #12207 . + This was previously accepted but will be phased out when `-Zscript` is stabilized. + For more information, see issue #12207 . "#]]) .run(); diff --git a/tests/testsuite/source_replacement.rs b/tests/testsuite/source_replacement.rs index 0bc5dd454b8..3161fc0e862 100644 --- a/tests/testsuite/source_replacement.rs +++ b/tests/testsuite/source_replacement.rs @@ -210,7 +210,7 @@ fn publish_with_replacement() { .with_stderr_data(str![[r#" [UPDATING] crates.io index [WARNING] manifest has no documentation, homepage or repository. -See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. + See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([ROOT]/foo) [UPDATING] `alternative` index [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) diff --git a/tests/testsuite/workspaces.rs b/tests/testsuite/workspaces.rs index 0f8ab785baf..653e93f1b5a 100644 --- a/tests/testsuite/workspaces.rs +++ b/tests/testsuite/workspaces.rs @@ -2361,8 +2361,8 @@ fn ws_warn_unused() { .with_stderr_data(&format!( "\ [WARNING] {} for the non root package will be ignored, specify {} at the workspace root: -package: [ROOT]/foo/a/Cargo.toml -workspace: [ROOT]/foo/Cargo.toml + package: [ROOT]/foo/a/Cargo.toml + workspace: [ROOT]/foo/Cargo.toml [CHECKING] a v0.1.0 ([ROOT]/foo/a) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s ", @@ -2398,7 +2398,7 @@ fn ws_warn_path() { p.cargo("check").with_stderr_data(str![[r#" [WARNING] [ROOT]/foo/a/Cargo.toml: the cargo feature `edition` has been stabilized in the 1.31 release and is no longer necessary to be listed in the manifest - See https://doc.rust-lang.org/cargo/reference/manifest.html#the-edition-field for more information about using this feature. + See https://doc.rust-lang.org/cargo/reference/manifest.html#the-edition-field for more information about using this feature. [CHECKING] foo v0.1.0 ([ROOT]/foo/a) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s