rename direct_const_arg! to gca! - #163198
Conversation
|
cc @rust-lang/clippy
cc @rust-lang/rustfmt HIR ty lowering was modified cc @fmease The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease This PR changes a file inside Some changes occurred in tests/ui/sanitizer cc @rcvalle |
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors squash msg="rename direct_const_arg! to gca!" |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Boxy <rust@boxyuwu.dev>
|
🔨 2 commits were squashed into 4dcd02e. |
08174a1 to
4dcd02e
Compare
|
@bors r+ |
…uwer Rollup of 12 pull requests Successful merges: - #162177 (Properly implement the gpu-kernel ABI for amdgpu) - #163168 (std: Update `wasip3` crate dependency) - #163179 (Cleanup offload build steps) - #163194 (Remove unused `StashKey::UnderscoreForArrayLengths`) - #163198 (rename direct_const_arg! to gca!) - #163205 (Remove `suggestion_for_allocator_api`) - #162497 (document `#[rustc_dyn_incompatible_trait]`) - #162702 (regression test for unconstrained const args) - #163191 (Enhance mutable closure suggestions with as_mut() support) - #163192 (Fix Typo in `std::sys::process::unix::unsupported::wait_status` Docs) - #163196 (Remove `DiagInner::sort_span`) - #163197 (Fix flt2dec build on 16-bit targets)
Rollup merge of #163198 - khyperia:rename-gca, r=BoxyUwU rename direct_const_arg! to gca! Also re-export it from `std`, and make most tests `use std::gca;` rather than writing out `core::` every time the macro is called. Part of the design rework discussed in Zulip [#project-const-generics > talkies at last @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/260443-project-const-generics/topic/talkies.20at.20last/near/620368825) r? @BoxyUwU
|
This caused a tiny perf regression It's so tiny that rust timer thinks it's noise, so feel free to ignore it :) |
|
Hmmm this pr is only a rename so maybe it is in fact noise? |
Huh. Yeah. The only thing I can think of is like, this adds a single macro reexport to |
rename GCA features fixes rust-lang/project-const-generics#114 We would like to publish posts soon that GCE is dying and GCA is the future. As part of that, we want the feature gates/etc. to be in their final-ish shape. We discussed a lot of naming bikesheds in the zulip thread [#project-const-generics > talkies at last @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/260443-project-const-generics/topic/talkies.20at.20last/near/620368825), namely: - `min_generic_const_args` -> `gca_min_const_items` - `generic_const_args` -> `gca_const_items` - `macroless_generic_const_args` -> `gca_macroless_args` - `macroless_const_item_generic_const_args` -> `gca_macroless_items` things that were discussed in that Zulip thread, but are not part of this PR: - `gca_adts` and/or `gca_arrays` (the feature is not created yet) - the `DirectConstArgContext` enum is in a vaguely awkwardly named spot after this PR. I intend to clean it up as part of creating the `gca_adts` feature (perhaps turning it into a bitflags for allowed syntax, or something) - renaming the `direct_const_arg!` macro to `gca!` - this was done in #163198 - deleting `type const`, introducing `#[always_gca]` - this was done in #162517 r? @BoxyUwU
Also re-export it from
std, and make most testsuse std::gca;rather than writing outcore::every time the macro is called.Part of the design rework discussed in Zulip #project-const-generics > talkies at last @ 💬
r? @BoxyUwU