diff options
| author | marcusdunn <marcus.s.dunn@gmail.com> | 2021-05-14 13:52:15 -0700 |
|---|---|---|
| committer | marcusdunn <marcus.s.dunn@gmail.com> | 2021-06-04 09:41:55 -0700 |
| commit | ef65e091dbf4063c019d3429789f3a0d0c73d098 (patch) | |
| tree | f0968bd7fa21f868cd19aa6e7fc9cc3db2657ed5 | |
| parent | 595088d602049d821bf9a217f2d79aea40715208 (diff) | |
| download | rust-ef65e091dbf4063c019d3429789f3a0d0c73d098.tar.gz rust-ef65e091dbf4063c019d3429789f3a0d0c73d098.zip | |
added unstable-book entry for bindings_after_at
| -rw-r--r-- | src/doc/unstable-book/src/language-features/bindings-after-at.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/language-features/bindings-after-at.md b/src/doc/unstable-book/src/language-features/bindings-after-at.md new file mode 100644 index 00000000000..15214862058 --- /dev/null +++ b/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}; +} +``` + |
