Skip to content

Conversation

Muscraft
Copy link
Member

@Muscraft Muscraft commented Jul 8, 2025

While working on getting annotate-snippets to match rustc, annotate-snippets was adding an extra new line after this line for run-make/crate-loading/multiple-dep-versions.rs. I found out this was because there was an explicit \n in the message that annotate-snippets was respecting, while rustc was skipping it. After talking with @estebank, I was told to remove the newline from the error message.

r? @estebank

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 8, 2025
@compiler-errors
Copy link
Member

Do you need to bless any tests for this? If CI is green, then r=me

@bors delegate+

@bors
Copy link
Collaborator

bors commented Jul 8, 2025

✌️ @Muscraft, you can now approve this pull request!

If @compiler-errors told you to "r=me" after making some further change, please make that change, then do @bors r=@compiler-errors

@compiler-errors
Copy link
Member

Oh, yeah, if we are skipping it on the rustc side then no stderr should change.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 8, 2025

📌 Commit 62951c2 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 8, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 8, 2025
…r-errors

fix: Remove newline from multiple crate versions note

While working on getting `annotate-snippets` to match `rustc`, `annotate-snippets` was adding an extra new line after [this line](https://github.com/rust-lang/rust/blob/a2d45f73c70d9dec57140c9412f83586eda895f8/tests/run-make/crate-loading/multiple-dep-versions.stderr#L9) for [`run-make/crate-loading/multiple-dep-versions.rs`](https://github.com/rust-lang/rust/blob/a2d45f73c70d9dec57140c9412f83586eda895f8/tests/run-make/crate-loading/multiple-dep-versions.rs). I found out this was because there was an explicit `\n` in the message that `annotate-snippets` was respecting, while `rustc` was [skipping it](https://github.com/rust-lang/rust/blob/2f8eeb2bba86b8f457ec602c578473c711f85628/compiler/rustc_errors/src/emitter.rs#L1542). After talking with `@estebank,` I was told to remove the newline from the error message.

r? `@estebank`
bors added a commit that referenced this pull request Jul 8, 2025
Rollup of 6 pull requests

Successful merges:

 - #134628 (Make `Default` const and add some `const Default` impls)
 - #143555 (Don't mark `#[target_feature]` safe fns as unsafe in rustdoc JSON.)
 - #143600 (Update intro blurb in `wasm32-wasip1` docs)
 - #143603 (Clarify the meaning of `AttributeOrder::KeepFirst` and `AttributeOrder::KeepLast`)
 - #143620 (fix: Remove newline from multiple crate versions note)
 - #143622 (Add target maintainer information for mips64-unknown-linux-muslabi64)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 8, 2025
Rollup of 6 pull requests

Successful merges:

 - #134628 (Make `Default` const and add some `const Default` impls)
 - #143555 (Don't mark `#[target_feature]` safe fns as unsafe in rustdoc JSON.)
 - #143600 (Update intro blurb in `wasm32-wasip1` docs)
 - #143603 (Clarify the meaning of `AttributeOrder::KeepFirst` and `AttributeOrder::KeepLast`)
 - #143620 (fix: Remove newline from multiple crate versions note)
 - #143622 (Add target maintainer information for mips64-unknown-linux-muslabi64)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 8, 2025
Rollup of 6 pull requests

Successful merges:

 - #134628 (Make `Default` const and add some `const Default` impls)
 - #143555 (Don't mark `#[target_feature]` safe fns as unsafe in rustdoc JSON.)
 - #143600 (Update intro blurb in `wasm32-wasip1` docs)
 - #143603 (Clarify the meaning of `AttributeOrder::KeepFirst` and `AttributeOrder::KeepLast`)
 - #143620 (fix: Remove newline from multiple crate versions note)
 - #143622 (Add target maintainer information for mips64-unknown-linux-muslabi64)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 8, 2025
…r-errors

fix: Remove newline from multiple crate versions note

While working on getting `annotate-snippets` to match `rustc`, `annotate-snippets` was adding an extra new line after [this line](https://github.com/rust-lang/rust/blob/a2d45f73c70d9dec57140c9412f83586eda895f8/tests/run-make/crate-loading/multiple-dep-versions.stderr#L9) for [`run-make/crate-loading/multiple-dep-versions.rs`](https://github.com/rust-lang/rust/blob/a2d45f73c70d9dec57140c9412f83586eda895f8/tests/run-make/crate-loading/multiple-dep-versions.rs). I found out this was because there was an explicit `\n` in the message that `annotate-snippets` was respecting, while `rustc` was [skipping it](https://github.com/rust-lang/rust/blob/2f8eeb2bba86b8f457ec602c578473c711f85628/compiler/rustc_errors/src/emitter.rs#L1542). After talking with ``@estebank,`` I was told to remove the newline from the error message.

r? ``@estebank``
bors added a commit that referenced this pull request Jul 8, 2025
Rollup of 8 pull requests

Successful merges:

 - #143402 (Port several linking (linkage?) related attributes the new attribute system )
 - #143555 (Don't mark `#[target_feature]` safe fns as unsafe in rustdoc JSON.)
 - #143593 (Port #[rustc_dummy])
 - #143600 (Update intro blurb in `wasm32-wasip1` docs)
 - #143603 (Clarify the meaning of `AttributeOrder::KeepFirst` and `AttributeOrder::KeepLast`)
 - #143606 (configure.py: Write last key in each section)
 - #143620 (fix: Remove newline from multiple crate versions note)
 - #143622 (Add target maintainer information for mips64-unknown-linux-muslabi64)

Failed merges:

 - #143403 (Port several trait/coherence-related attributes the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 8, 2025
Rollup of 7 pull requests

Successful merges:

 - #143402 (Port several linking (linkage?) related attributes the new attribute system )
 - #143555 (Don't mark `#[target_feature]` safe fns as unsafe in rustdoc JSON.)
 - #143593 (Port #[rustc_dummy])
 - #143600 (Update intro blurb in `wasm32-wasip1` docs)
 - #143603 (Clarify the meaning of `AttributeOrder::KeepFirst` and `AttributeOrder::KeepLast`)
 - #143620 (fix: Remove newline from multiple crate versions note)
 - #143622 (Add target maintainer information for mips64-unknown-linux-muslabi64)

Failed merges:

 - #143403 (Port several trait/coherence-related attributes the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 38bfba6 into rust-lang:master Jul 8, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 8, 2025
rust-timer added a commit that referenced this pull request Jul 8, 2025
Rollup merge of #143620 - Muscraft:remove-newline, r=compiler-errors

fix: Remove newline from multiple crate versions note

While working on getting `annotate-snippets` to match `rustc`, `annotate-snippets` was adding an extra new line after [this line](https://github.com/rust-lang/rust/blob/a2d45f73c70d9dec57140c9412f83586eda895f8/tests/run-make/crate-loading/multiple-dep-versions.stderr#L9) for [`run-make/crate-loading/multiple-dep-versions.rs`](https://github.com/rust-lang/rust/blob/a2d45f73c70d9dec57140c9412f83586eda895f8/tests/run-make/crate-loading/multiple-dep-versions.rs). I found out this was because there was an explicit `\n` in the message that `annotate-snippets` was respecting, while `rustc` was [skipping it](https://github.com/rust-lang/rust/blob/2f8eeb2bba86b8f457ec602c578473c711f85628/compiler/rustc_errors/src/emitter.rs#L1542). After talking with ```@estebank,``` I was told to remove the newline from the error message.

r? ```@estebank```
@Muscraft Muscraft deleted the remove-newline branch July 8, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants