]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/issue-56267.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / codegen / issue-56267.rs
1 // compile-flags: -C no-prepopulate-passes
2
3 #![crate_type="rlib"]
4
5 #[allow(dead_code)]
6 pub struct Foo<T> {
7     foo: u64,
8     bar: T,
9 }
10
11 // The store writing to bar.1 should have alignment 4. Not checking
12 // other stores here, as the alignment will be platform-dependent.
13
14 // CHECK: store i32 [[TMP1:%.+]], {{i32\*|ptr}} [[TMP2:%.+]], align 4
15 #[no_mangle]
16 pub fn test(x: (i32, i32)) -> Foo<(i32, i32)> {
17     Foo { foo: 0, bar: x }
18 }