Use immediate_backend_type when reading from a const alloc
This commit is contained in:
parent
2b399b5275
commit
b0a580112b
2 changed files with 16 additions and 1 deletions
15
tests/ui/codegen/const-bool-bitcast.rs
Normal file
15
tests/ui/codegen/const-bool-bitcast.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
// This is a regression test for https://github.com/rust-lang/rust/issues/118047
|
||||
// build-pass
|
||||
// compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+DataflowConstProp
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
pub struct State {
|
||||
inner: bool
|
||||
}
|
||||
|
||||
pub fn make() -> State {
|
||||
State {
|
||||
inner: true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue