-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Do not format generic consts #132540
Do not format generic consts #132540
Conversation
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and I think it's better that we leave the formatting unchanged instead of dropping the generics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
r=me when ci is done
@bors r=calebcartwright |
Do not format generic consts We introduced **nightly support** for generic const items in rust-lang#113522, but formatting of consts was not modified. Making them format *correctly* is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items. r? `@calebcartwright` or `@ytmimi`
…kingjubilee Rollup of 12 pull requests Successful merges: - rust-lang#132393 (Docs: added brief colon explanation) - rust-lang#132419 (PassWrapper: adapt for llvm/llvm-project@b01e2a8b5620466c3b) - rust-lang#132437 (coverage: Regression test for inlining into an uninstrumented crate) - rust-lang#132458 (get rid of a whole bunch of unnecessary rustc_const_unstable attributes) - rust-lang#132499 (unicode_data.rs: show command for generating file) - rust-lang#132503 (better test for const HashMap; remove const_hash leftovers) - rust-lang#132514 (Port most of `--print=target-cpus` to Rust) - rust-lang#132520 (NFC add known bug nr to test) - rust-lang#132522 (make codegen help output more consistent) - rust-lang#132523 (Added regression test for generics index out of bounds) - rust-lang#132526 (Subtree sync for rustc_codegen_cranelift) - rust-lang#132528 (Use `*_opt` typeck results fns to not ICE in fallback suggestion) - rust-lang#132540 (Do not format generic consts) Failed merges: - rust-lang#132511 (stabilize const_arguments_as_str) r? `@ghost` `@rustbot` modify labels: rollup
Do not format generic consts We introduced **nightly support** for generic const items in rust-lang#113522, but formatting of consts was not modified. Making them format *correctly* is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items. r? ``@calebcartwright`` or ``@ytmimi``
Do not format generic consts We introduced **nightly support** for generic const items in rust-lang#113522, but formatting of consts was not modified. Making them format *correctly* is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items. r? ```@calebcartwright``` or ```@ytmimi```
…kingjubilee Rollup of 15 pull requests Successful merges: - rust-lang#129329 (Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>`) - rust-lang#131377 (Add LowerExp and UpperExp implementations to NonZero) - rust-lang#132275 (Register `~const` preds for `Deref` adjustments in HIR typeck) - rust-lang#132393 (Docs: added brief colon explanation) - rust-lang#132437 (coverage: Regression test for inlining into an uninstrumented crate) - rust-lang#132499 (unicode_data.rs: show command for generating file) - rust-lang#132503 (better test for const HashMap; remove const_hash leftovers) - rust-lang#132520 (NFC add known bug nr to test) - rust-lang#132522 (make codegen help output more consistent) - rust-lang#132523 (Added regression test for generics index out of bounds) - rust-lang#132528 (Use `*_opt` typeck results fns to not ICE in fallback suggestion) - rust-lang#132537 (PassWrapper: adapt for llvm/llvm-project@5445edb5d) - rust-lang#132540 (Do not format generic consts) - rust-lang#132543 (add and update some crashtests) - rust-lang#132550 (compiler: Continue introducing rustc_abi to the compiler) r? `@ghost` `@rustbot` modify labels: rollup
Do not format generic consts We introduced **nightly support** for generic const items in rust-lang#113522, but formatting of consts was not modified. Making them format *correctly* is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items. r? ````@calebcartwright```` or ````@ytmimi````
…iaskrgr Rollup of 16 pull requests Successful merges: - rust-lang#129329 (Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>`) - rust-lang#131377 (Add LowerExp and UpperExp implementations to NonZero) - rust-lang#132393 (Docs: added brief colon explanation) - rust-lang#132437 (coverage: Regression test for inlining into an uninstrumented crate) - rust-lang#132499 (unicode_data.rs: show command for generating file) - rust-lang#132503 (better test for const HashMap; remove const_hash leftovers) - rust-lang#132511 (stabilize const_arguments_as_str) - rust-lang#132520 (NFC add known bug nr to test) - rust-lang#132522 (make codegen help output more consistent) - rust-lang#132523 (Added regression test for generics index out of bounds) - rust-lang#132528 (Use `*_opt` typeck results fns to not ICE in fallback suggestion) - rust-lang#132537 (PassWrapper: adapt for llvm/llvm-project@5445edb5d) - rust-lang#132540 (Do not format generic consts) - rust-lang#132543 (add and update some crashtests) - rust-lang#132544 (Use backticks instead of single quotes for library feature names in diagnostics) - rust-lang#132550 (compiler: Continue introducing rustc_abi to the compiler) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 15 pull requests Successful merges: - rust-lang#129329 (Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>`) - rust-lang#131377 (Add LowerExp and UpperExp implementations to NonZero) - rust-lang#132393 (Docs: added brief colon explanation) - rust-lang#132437 (coverage: Regression test for inlining into an uninstrumented crate) - rust-lang#132499 (unicode_data.rs: show command for generating file) - rust-lang#132503 (better test for const HashMap; remove const_hash leftovers) - rust-lang#132511 (stabilize const_arguments_as_str) - rust-lang#132520 (NFC add known bug nr to test) - rust-lang#132522 (make codegen help output more consistent) - rust-lang#132523 (Added regression test for generics index out of bounds) - rust-lang#132528 (Use `*_opt` typeck results fns to not ICE in fallback suggestion) - rust-lang#132537 (PassWrapper: adapt for llvm/llvm-project@5445edb5d) - rust-lang#132540 (Do not format generic consts) - rust-lang#132543 (add and update some crashtests) - rust-lang#132550 (compiler: Continue introducing rustc_abi to the compiler) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132540 - compiler-errors:gc, r=calebcartwright Do not format generic consts We introduced **nightly support** for generic const items in rust-lang#113522, but formatting of consts was not modified. Making them format *correctly* is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items. r? `````@calebcartwright````` or `````@ytmimi`````
We introduced nightly support for generic const items in #113522, but formatting of consts was not modified. Making them format correctly is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items.
r? @calebcartwright or @ytmimi