Files
rust/tests/ui/pattern/check-struct-pat-fields-stability-issue-138319.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
286 B
Rust
Raw Normal View History

//@ 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;
}