blob: b951c6d92ee6bfb58055bd2a622a48e38676309d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//@ 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;
}
|