Use the type-level constant value ty::Value where needed#136430
Merged
bors merged 2 commits intorust-lang:masterfrom Feb 4, 2025
Merged
Use the type-level constant value ty::Value where needed#136430bors merged 2 commits intorust-lang:masterfrom
ty::Value where needed#136430bors merged 2 commits intorust-lang:masterfrom
Conversation
Collaborator
|
Some changes occurred to the CTFE machinery cc @rust-lang/wg-const-eval Some changes occurred in match checking cc @Nadrieril |
oli-obk
reviewed
Feb 2, 2025
oli-obk
reviewed
Feb 2, 2025
Contributor
|
Everything but const_to_pat seems fine to me. There may be avenues for further improvements/deduplications, but I haven't come up with anything obviously improving things yet |
Contributor
Author
|
In |
26f48df to
709a63a
Compare
Contributor
|
@bors r+ rollup |
Collaborator
lukas-code
reviewed
Feb 2, 2025
lukas-code
reviewed
Feb 2, 2025
Contributor
|
@bors r- |
Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
709a63a to
6e0dfc8
Compare
Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
ty::Valuety::Value where needed
Contributor
|
@bors r+ |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 3, 2025
… r=oli-obk Use the type-level constant value `ty::Value` where needed **Follow-up to rust-lang#136180** ### Summary This PR refactors functions to accept a single type-level constant value `ty::Value` instead of separate `ty::ValTree` and `ty::Ty` parameters: - `valtree_to_const_value`: now takes `ty::Value` - `pretty_print_const_valtree`: now takes `ty::Value` - Uses `pretty_print_const_valtree` for formatting valtrees when `visit_const_operand` - Moves `try_to_raw_bytes` from `ty::Valtree` to `ty::Value` --- r? `@lukas-code` `@oli-obk`
This was referenced Feb 3, 2025
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 4, 2025
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#136289 (OnceCell & OnceLock docs: Using (un)initialized consistently) - rust-lang#136299 (Ignore NLL boring locals in polonius diagnostics) - rust-lang#136411 (Omit argument names from function pointers that do not have argument names) - rust-lang#136430 (Use the type-level constant value `ty::Value` where needed) - rust-lang#136476 (Remove generic `//@ ignore-{wasm,wasm32,emscripten}` in tests) - rust-lang#136484 (Notes on types/traits used for in-memory query caching) - rust-lang#136493 (platform-support: document CPU baseline for x86-32 targets) - rust-lang#136498 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 4, 2025
Rollup merge of rust-lang#136430 - FedericoBruzzone:follow-up-136180, r=oli-obk Use the type-level constant value `ty::Value` where needed **Follow-up to rust-lang#136180** ### Summary This PR refactors functions to accept a single type-level constant value `ty::Value` instead of separate `ty::ValTree` and `ty::Ty` parameters: - `valtree_to_const_value`: now takes `ty::Value` - `pretty_print_const_valtree`: now takes `ty::Value` - Uses `pretty_print_const_valtree` for formatting valtrees when `visit_const_operand` - Moves `try_to_raw_bytes` from `ty::Valtree` to `ty::Value` --- r? ``@lukas-code`` ``@oli-obk``
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #136180
Summary
This PR refactors functions to accept a single type-level constant value
ty::Valueinstead of separatety::ValTreeandty::Typarameters:valtree_to_const_value: now takesty::Valuepretty_print_const_valtree: now takesty::Valuepretty_print_const_valtreefor formatting valtrees whenvisit_const_operandtry_to_raw_bytesfromty::Valtreetoty::Valuer? @lukas-code @oli-obk