Use the type-level constant value `ty::Value` where needed by FedericoBruzzone · Pull Request #136430 · rust-lang/rust
rustbot
added
S-waiting-on-review
labels
Feb 2, 2025
bors
added
S-waiting-on-bors
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
Feb 2, 2025
bors
added
S-waiting-on-author
and removed S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.labels
Feb 3, 2025
FedericoBruzzone
changed the title
Refactor using the type-level constant value
Use the type-level constant value ty::Valuety::Value where needed
bors
added
S-waiting-on-bors
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.labels
Feb 3, 2025matthiaskrgr 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, 2025bors 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, 2025Rollup 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