Skip to content

Commit 4a3e937

Browse files
committed
fix(future): Remove leading newline to match note conventions
1 parent a1d9160 commit 4a3e937

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

src/cargo/core/compiler/future_incompat.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,7 @@ https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch
496496
String::new()
497497
} else {
498498
let mut suggestion_message = String::new();
499-
writeln!(
500-
&mut suggestion_message,
501-
"
502-
{suggestion_header}"
503-
)
504-
.unwrap();
499+
writeln!(&mut suggestion_message, "{suggestion_header}").unwrap();
505500
for suggestion in &suggestions {
506501
writeln!(
507502
&mut suggestion_message,

tests/testsuite/future_incompat_report.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ fn incompat_in_dependency() {
146146
.with_stderr_data(str![[r#"
147147
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
148148
[WARNING] the following packages contain code that will be rejected by a future version of Rust: bar v1.0.0
149-
[NOTE]
150-
To solve this problem, you can try the following approaches:
149+
[NOTE] To solve this problem, you can try the following approaches:
151150
152151
- If the issue is not solved by updating the dependencies, a fix has to be
153152
implemented by those dependencies. You can help with that by notifying the
@@ -180,7 +179,6 @@ to be in wide use.
180179
Each warning should contain a link for more information on what the warning
181180
means and how to resolve it.
182181
183-
184182
To solve this problem, you can try the following approaches:
185183
186184
- If the issue is not solved by updating the dependencies, a fix has to be
@@ -603,8 +601,7 @@ fn suggestions_for_updates() {
603601
[CHECKING] foo v0.1.0 ([ROOT]/foo)
604602
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
605603
[WARNING] the following packages contain code that will be rejected by a future version of Rust: big_update v1.0.0, with_updates v1.0.0, without_updates v1.0.0
606-
[NOTE]
607-
To solve this problem, you can try the following approaches:
604+
[NOTE] To solve this problem, you can try the following approaches:
608605
609606
- Some affected dependencies have newer versions available.
610607
You may want to consider updating them to a newer version to see if the issue has been fixed.
@@ -651,7 +648,6 @@ to be in wide use.
651648
Each warning should contain a link for more information on what the warning
652649
means and how to resolve it.
653650
654-
655651
To solve this problem, you can try the following approaches:
656652
657653
- Some affected dependencies have newer versions available.
@@ -718,8 +714,7 @@ fn correct_report_id_when_cached() {
718714
[CHECKING] foo v1.0.0 ([ROOT]/foo)
719715
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
720716
[WARNING] the following packages contain code that will be rejected by a future version of Rust: bar v1.0.0
721-
[NOTE]
722-
To solve this problem, you can try the following approaches:
717+
[NOTE] To solve this problem, you can try the following approaches:
723718
724719
- If the issue is not solved by updating the dependencies, a fix has to be
725720
implemented by those dependencies. You can help with that by notifying the
@@ -745,8 +740,7 @@ https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch
745740
.with_stderr_data(str![[r#"
746741
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
747742
[WARNING] the following packages contain code that will be rejected by a future version of Rust: bar v1.0.0
748-
[NOTE]
749-
To solve this problem, you can try the following approaches:
743+
[NOTE] To solve this problem, you can try the following approaches:
750744
751745
- If the issue is not solved by updating the dependencies, a fix has to be
752746
implemented by those dependencies. You can help with that by notifying the

0 commit comments

Comments
 (0)