Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/test/ui/bogus-error-#39161.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// run-pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be // check-pass?

struct X { a: i32, b: i32 }

#[allow(unused_variables)]
fn main() {
const DX: X = X { a: 0, b: 0 };
const X1: X = X { a: 1, ..DX }; // ok
let x2 = X { a: 1, b: 2, ..DX }; // ok
const X3: X = X { a: 1, b: 2, ..DX }; // error[E0016]
}