Skip to content

Commit

Permalink
added unstable-book entry for bindings_after_at
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusDunn committed Jun 4, 2021
1 parent 595088d commit ef65e09
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/doc/unstable-book/src/language-features/bindings-after-at.md
@@ -0,0 +1,22 @@
# `bindings_after_at`

The tracking issue for this feature is [#65490]

[#65490]: https://github.com/rust-lang/rust/issues/65490


The `bindings_after_at` feature gate allows patterns of form `binding @ pat` to have bindings in `pat`.

```rust
#![feature(bindings_after_at)]

struct Point {
x: i32,
y: i32,
}

fn main() {
let point@ Point{x: px, y: py} = Point {x: 12, y: 34};
}
```

0 comments on commit ef65e09

Please sign in to comment.