mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
aad1db7373
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
13 lines
286 B
Rust
13 lines
286 B
Rust
//@ check-pass
|
|
struct Point {
|
|
#[deprecated = "x is deprecated"]
|
|
_x: i32,
|
|
_y: i32,
|
|
}
|
|
|
|
fn main() {
|
|
let p = Point { _x: 1, _y: 2 }; //~ WARNING use of deprecated field `Point::_x`
|
|
// Before fix, it report an warning
|
|
let Point { #[expect(deprecated)]_x, .. } = p;
|
|
}
|