2023-08-31 20:06:02 -05:00
|
|
|
// Regression test for issue 115264
|
|
|
|
// Tests that retrieving the ident of 'foo' variable in
|
|
|
|
// the pattern inside main() does not cause an ICE
|
|
|
|
|
2024-02-16 14:02:50 -06:00
|
|
|
//@ check-pass
|
2023-08-31 20:06:02 -05:00
|
|
|
|
|
|
|
struct X {
|
|
|
|
foo: i32,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[allow(unused_variables)]
|
|
|
|
fn main() {
|
|
|
|
let X {
|
|
|
|
#[doc(alias = "StructItem")]
|
|
|
|
foo
|
|
|
|
} = X {
|
|
|
|
foo: 123
|
|
|
|
};
|
|
|
|
}
|