Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace format flags u32 by enums and bools. #106806

Merged
merged 3 commits into from
Jan 27, 2023

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Jan 13, 2023

This gets rid of the flags: u32 field where each bit has a special meaning, and replaces it by simple enums and booleans.

Part of #99012

@m-ou-se m-ou-se added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. A-fmt Area: `std::fmt` labels Jan 13, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2023

r? @michaelwoerister

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 13, 2023
@clarfonthey
Copy link
Contributor

I'm in favour of this, but it's worth mentioning the comment I brought up in #99138 -- because the debug-hex flag doesn't expose a proper API beyond the deprecated flags method, there may be code that relies on the exact position of this flag for implementing their own debug-hex behaviour.

@m-ou-se
Copy link
Member Author

m-ou-se commented Jan 14, 2023

That doesn't change. This only changes the internal representation in Rustc. The representation in std still has the same flags field with the same bits.

@clarfonthey
Copy link
Contributor

Ah nice, so you've already handled that. Awesome work. 👍🏻

@rustbot rustbot removed the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jan 18, 2023
@bors
Copy link
Contributor

bors commented Jan 26, 2023

☔ The latest upstream changes (presumably #106745) made this pull request unmergeable. Please resolve the merge conflicts.

@m-ou-se m-ou-se removed the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Jan 27, 2023
@m-ou-se m-ou-se marked this pull request as ready for review January 27, 2023 08:25
@rustbot
Copy link
Collaborator

rustbot commented Jan 27, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@m-ou-se
Copy link
Member Author

m-ou-se commented Jan 27, 2023

r? @oli-obk

@rustbot rustbot assigned oli-obk and unassigned michaelwoerister Jan 27, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Jan 27, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 27, 2023

📌 Commit 21cf9db has been approved by oli-obk

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 Jan 27, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2023
Rollup of 9 pull requests

Successful merges:

 - rust-lang#106806 (Replace format flags u32 by enums and bools.)
 - rust-lang#107194 (Remove dependency on slice_internals feature in rustc_ast)
 - rust-lang#107234 (Revisit fix_is_ci_llvm_available logic)
 - rust-lang#107316 (Update snap from `1.0.1` to `1.1.0`)
 - rust-lang#107321 (solver comments + remove `TyCtxt::evaluate_goal`)
 - rust-lang#107332 (Fix wording from `rustbuild` to `bootstrap`)
 - rust-lang#107347 (reduce rightward-drift)
 - rust-lang#107352 (compiler: Fix E0587 explanation)
 - rust-lang#107357 (Fix infinite loop in rustdoc get_all_import_attributes function)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1163279 into rust-lang:master Jan 27, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 27, 2023
@m-ou-se m-ou-se deleted the format-args-flags branch January 29, 2023 19:11
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 10, 2023
Rollup of 9 pull requests

Successful merges:

 - rust-lang#106806 (Replace format flags u32 by enums and bools.)
 - rust-lang#107194 (Remove dependency on slice_internals feature in rustc_ast)
 - rust-lang#107234 (Revisit fix_is_ci_llvm_available logic)
 - rust-lang#107316 (Update snap from `1.0.1` to `1.1.0`)
 - rust-lang#107321 (solver comments + remove `TyCtxt::evaluate_goal`)
 - rust-lang#107332 (Fix wording from `rustbuild` to `bootstrap`)
 - rust-lang#107347 (reduce rightward-drift)
 - rust-lang#107352 (compiler: Fix E0587 explanation)
 - rust-lang#107357 (Fix infinite loop in rustdoc get_all_import_attributes function)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-fmt Area: `std::fmt` 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.

6 participants