diff options
Diffstat (limited to 'tests/ui/codegen')
-rw-r--r-- | tests/ui/codegen/const-bool-bitcast.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/codegen/const-bool-bitcast.rs b/tests/ui/codegen/const-bool-bitcast.rs new file mode 100644 index 000000000..24ae76b90 --- /dev/null +++ b/tests/ui/codegen/const-bool-bitcast.rs @@ -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 + } +} |