Skip to content

Commit d3f5fef

Browse files
committed
manually line wrap warnings at 80 characters
1 parent 54e7bc5 commit d3f5fef

File tree

3 files changed

+34
-26
lines changed

3 files changed

+34
-26
lines changed

src/cargo/util/toml/targets.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -595,18 +595,20 @@ fn toml_targets_and_inferred(
595595
}
596596
warnings.push(format!(
597597
"\
598-
An explicit [[{section}]] section is specified in Cargo.toml which currently disables Cargo from \
599-
automatically inferring other {target_kind_human} targets. This inference behavior will change in \
600-
the Rust 2018 edition and the following files will be included as a {target_kind_human} target:
598+
An explicit [[{section}]] section is specified in Cargo.toml which currently
599+
disables Cargo from automatically inferring other {target_kind_human} targets.
600+
This inference behavior will change in the Rust 2018 edition and the following
601+
files will be included as a {target_kind_human} target:
601602
602603
{rem_targets_str}
603-
This is likely to break cargo build or cargo test as these files may not be ready to be compiled \
604-
as a {target_kind_human} target today. You can future-proof yourself and disable this warning by \
605-
adding {autodiscover_flag_name} = false to your [package] section. You may also move the files to \
606-
a location where Cargo would not automatically infer them to be a target, such as in subfolders.
607-
608-
For more information on this warning you can consult https://github.com/rust-lang/cargo/issues/5330\
609-
",
604+
This is likely to break cargo build or cargo test as these files may not be
605+
ready to be compiled as a {target_kind_human} target today. You can future-proof yourself
606+
and disable this warning by adding {autodiscover_flag_name} = false to your [package]
607+
section. You may also move the files to a location where Cargo would not
608+
automatically infer them to be a target, such as in subfolders.
609+
610+
For more information on this warning you can consult
611+
https://github.com/rust-lang/cargo/issues/5330",
610612
section = target_kind,
611613
target_kind_human = target_kind_human,
612614
rem_targets_str = rem_targets_str,

tests/testsuite/bench.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -753,18 +753,21 @@ fn bench_autodiscover_2015() {
753753
.masquerade_as_nightly_cargo(),
754754
execs().with_stderr(&format!(
755755
"warning: \
756-
An explicit [[bench]] section is specified in Cargo.toml which currently disables Cargo from \
757-
automatically inferring other benchmark targets. This inference behavior will change in \
758-
the Rust 2018 edition and the following files will be included as a benchmark target:
756+
An explicit [[bench]] section is specified in Cargo.toml which currently
757+
disables Cargo from automatically inferring other benchmark targets.
758+
This inference behavior will change in the Rust 2018 edition and the following
759+
files will be included as a benchmark target:
759760
760761
* [..]bench_basic.rs
761762
762-
This is likely to break cargo build or cargo test as these files may not be ready to be compiled \
763-
as a benchmark target today. You can future-proof yourself and disable this warning by \
764-
adding autobenches = false to your [package] section. You may also move the files to \
765-
a location where Cargo would not automatically infer them to be a target, such as in subfolders.
763+
This is likely to break cargo build or cargo test as these files may not be
764+
ready to be compiled as a benchmark target today. You can future-proof yourself
765+
and disable this warning by adding autobenches = false to your [package]
766+
section. You may also move the files to a location where Cargo would not
767+
automatically infer them to be a target, such as in subfolders.
766768
767-
For more information on this warning you can consult https://github.com/rust-lang/cargo/issues/5330
769+
For more information on this warning you can consult
770+
https://github.com/rust-lang/cargo/issues/5330
768771
[COMPILING] foo v0.0.1 ({})
769772
[FINISHED] release [optimized] target(s) in [..]
770773
[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]

tests/testsuite/run.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -446,18 +446,21 @@ fn run_example_autodiscover_2015() {
446446
.masquerade_as_nightly_cargo(),
447447
execs().with_status(101).with_stderr(
448448
"warning: \
449-
An explicit [[example]] section is specified in Cargo.toml which currently disables Cargo from \
450-
automatically inferring other example targets. This inference behavior will change in \
451-
the Rust 2018 edition and the following files will be included as a example target:
449+
An explicit [[example]] section is specified in Cargo.toml which currently
450+
disables Cargo from automatically inferring other example targets.
451+
This inference behavior will change in the Rust 2018 edition and the following
452+
files will be included as a example target:
452453
453454
* [..]a.rs
454455
455-
This is likely to break cargo build or cargo test as these files may not be ready to be compiled \
456-
as a example target today. You can future-proof yourself and disable this warning by \
457-
adding autoexamples = false to your [package] section. You may also move the files to \
458-
a location where Cargo would not automatically infer them to be a target, such as in subfolders.
456+
This is likely to break cargo build or cargo test as these files may not be
457+
ready to be compiled as a example target today. You can future-proof yourself
458+
and disable this warning by adding autoexamples = false to your [package]
459+
section. You may also move the files to a location where Cargo would not
460+
automatically infer them to be a target, such as in subfolders.
459461
460-
For more information on this warning you can consult https://github.com/rust-lang/cargo/issues/5330
462+
For more information on this warning you can consult
463+
https://github.com/rust-lang/cargo/issues/5330
461464
error: no example target named `a`
462465
",
463466
),

0 commit comments

Comments
 (0)