Rollup merge of #86381 - yerke:add-test-for-issue-39161, r=JohnTitor

Add regression test for issue #39161

Closes #39161

Based on feedback from ``@JohnTitor`` in https://github.com/rust-lang/rust/pull/71333

r? ``@JohnTitor``
This commit is contained in:
Yuki Okushi 2021-06-22 07:37:52 +09:00 committed by GitHub
commit 4d73300f8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,13 @@
// check-pass
pub struct X {
pub a: i32,
pub b: i32,
}
fn main() {
const DX: X = X { a: 0, b: 0 };
const _X1: X = X { a: 1, ..DX };
let _x2 = X { a: 1, b: 2, ..DX };
const _X3: X = X { a: 1, b: 2, ..DX };
}