mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
20 lines
326 B
Rust
20 lines
326 B
Rust
// Regression test for issue 115264
|
|
// Tests that retrieving the ident of 'foo' variable in
|
|
// the pattern inside main() does not cause an ICE
|
|
|
|
//@ check-pass
|
|
|
|
struct X {
|
|
foo: i32,
|
|
}
|
|
|
|
#[allow(unused_variables)]
|
|
fn main() {
|
|
let X {
|
|
#[doc(alias = "StructItem")]
|
|
foo
|
|
} = X {
|
|
foo: 123
|
|
};
|
|
}
|