diff options
| author | bors <bors@rust-lang.org> | 2023-04-23 13:33:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-23 13:33:51 +0000 |
| commit | 496c11005c30d93cbae5e2f27f15cc387dc0787b (patch) | |
| tree | 68ae1922329ca16b40859c8db3441b31d278ad91 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 316d83a4d81d295f5a36361d8141f030f513c3ee (diff) | |
| parent | 654d12ff8930a332a4cdcfccc6c1c34700e2f3b7 (diff) | |
| download | rust-496c11005c30d93cbae5e2f27f15cc387dc0787b.tar.gz rust-496c11005c30d93cbae5e2f27f15cc387dc0787b.zip | |
Auto merge of #10679 - y21:better-const-ctx-check, r=Jarcho
use `is_inside_const_context` for `in_constant` util fn
Fixes #10452.
This PR improves the `in_constant` util function to detect more cases of const contexts. Previously this function would not detect cases like expressions in array length position or expression in an inline const block `const { .. }`.
changelog: [`bool_to_int_with_if`]: recognize array length operand as being in a const context and don't suggest `usize::from` there
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
