Skip to content

Commit

Permalink
Rollup merge of rust-lang#86381 - yerke:add-test-for-issue-39161, r=J…
Browse files Browse the repository at this point in the history
…ohnTitor

Add regression test for issue rust-lang#39161

Closes rust-lang#39161

Based on feedback from `@JohnTitor` in rust-lang#71333

r? `@JohnTitor`
  • Loading branch information
JohnTitor authored Jun 21, 2021
2 parents 4706e45 + 503abc7 commit 63ad2ea
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/test/ui/consts/issue-39161-bogus-error.rs
Original file line number Diff line number Diff line change
@@ -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 };
}

0 comments on commit 63ad2ea

Please sign in to comment.