Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only rewrite valtree-constants to patterns and keep other constants opaque #111913

Merged
merged 12 commits into from
May 31, 2023
Prev Previous commit
Explain the reason for why a test exists
oli-obk committed May 31, 2023
commit 3c02cfc3e7e52ce023b565180c63c72bd7ab675d
2 changes: 2 additions & 0 deletions tests/codegen/const_scalar_pair.rs
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@

#![feature(inline_const)]

// Test that we don't generate a memory allocation for the constant
// and read the fields from that, but instead just create the value pair directly.
pub fn foo() -> (i32, i32) {
// CHECK: ret { i32, i32 } { i32 1, i32 2 }
const { (1, 2) }