about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-23 13:33:51 +0000
committerbors <bors@rust-lang.org>2023-04-23 13:33:51 +0000
commit496c11005c30d93cbae5e2f27f15cc387dc0787b (patch)
tree68ae1922329ca16b40859c8db3441b31d278ad91 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent316d83a4d81d295f5a36361d8141f030f513c3ee (diff)
parent654d12ff8930a332a4cdcfccc6c1c34700e2f3b7 (diff)
downloadrust-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