Skip to content

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Jan 21, 2021

Original title: Reduce code generated by dbg! macro
The expanded code before/after: https://rust.godbolt.org/z/hE3j95.


We cannot use concat! since file! could contains { or the expression is a block ({ .. }).
Using it will generated malformed format strings.
So let's document this reason why we don't use concat! macro at all.

@rust-highfive
Copy link
Contributor

r? @m-ou-se

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 21, 2021
@tesuji tesuji changed the title Reduce code generated by dbg! macro Document why not use concat! in dbg! macro Jan 21, 2021
@KodrAus
Copy link
Contributor

KodrAus commented Jan 21, 2021

Thanks! @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jan 21, 2021

📌 Commit 6f22803e052bfdcb0a4879940b5a3509ac890340 has been approved by KodrAus

@bors
Copy link
Collaborator

bors commented Jan 21, 2021

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@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 Jan 21, 2021
@KodrAus
Copy link
Contributor

KodrAus commented Jan 22, 2021

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jan 22, 2021

📌 Commit d0c1405 has been approved by KodrAus

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 22, 2021
Rollup of 10 pull requests

Successful merges:

 - rust-lang#80573 (Deny rustc::internal lints for rustdoc and clippy)
 - rust-lang#81173 (Expand docs on Iterator::intersperse)
 - rust-lang#81194 (Stabilize std::panic::panic_any.)
 - rust-lang#81202 (Don't prefix 0x for each segments in `dbg!(Ipv6)`)
 - rust-lang#81225 (Make 'docs' nullable in rustdoc-json output)
 - rust-lang#81227 (Remove doctree::StructType)
 - rust-lang#81233 (Document why not use concat! in dbg! macro)
 - rust-lang#81236 (Gracefully handle loop labels missing leading `'` in different positions)
 - rust-lang#81241 (Turn alloc's force_expr macro into a regular macro_rules.)
 - rust-lang#81242 (Enforce statically that `MIN_NON_ZERO_CAP` is calculated at compile time)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 81a60b7 into rust-lang:master Jan 22, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 22, 2021
@tesuji tesuji deleted the dbg branch January 23, 2021 01:06
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants