Fix global_asm macro pretty printing by compiler-errors · Pull Request #101369 · rust-lang/rust (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation5 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

compiler-errors

@compiler-errors

@rustbot rustbot added the T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

label

Sep 3, 2022

@rust-highfive

r? @jackh726

(rust-highfive has picked a reviewer for you, use r? to override)

@compiler-errors

cc @ojeda, this fixes the global_asm! mysteriously disappearing and the missing semicolon, but not the path being shortened (core::arch::global_asm -> global_asm) and the indentation within the macro's string contents itself -- if those latter two are issues, do you mind filing separate bugs for them? I couldn't tell if both of those were blockers too, or just asides that you thought you'd mention in the issues I linked.

@ojeda

@compiler-errors Thanks a lot! They are not blockers in the sense that one can still run rustfmt on top of it (and anyway the output of this feature is best-effort anyway as far as I understand).

Having said that, I think the closer the output looks to the source code, the better; and in particular the case of the shortened path may be fairly surprising and easily makes the code non-compilable (even if that is a non-goal of -Zunpretty=expanded). So I think it is worth opening an issue for it, even if only for future reference -- I will do so.

@ojeda ojeda mentioned this pull request

Sep 3, 2022

56 tasks

@jackh726

@bors

📌 Commit e9b01c7 has been approved by jackh726

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

Sep 3, 2022

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 4, 2022

@bors

…iaskrgr

Rollup of 4 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

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.