diff options
| author | bors <bors@rust-lang.org> | 2020-02-09 04:01:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-09 04:01:28 +0000 |
| commit | f8d830b4decaef5a6ae0f27baac14dfb48baa4c5 (patch) | |
| tree | a5e7a6a7f68e12dbd174c1313b4d0ab0e742dbdc /src/librustc_error_codes/error_codes | |
| parent | a19edd6b161521a4f66716b3b45b8cf4d3f03f3a (diff) | |
| parent | d2b88b7050b0e21b136022c4cfe8d352c1425588 (diff) | |
Auto merge of #68376 - Centril:move-ref-patterns, r=matthewjasper
Initial implementation of `#![feature(move_ref_pattern)]` Following up on #45600, under the gate `#![feature(move_ref_pattern)]`, `(ref x, mut y)` is allowed subject to restrictions necessary for soundness. The match checking implementation and tests for `#![feature(bindings_after_at)]` is also adjusted as necessary. Closes #45600. Tracking issue: #68354. r? @matthewjasper
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0009.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_error_codes/error_codes/E0009.md b/src/librustc_error_codes/error_codes/E0009.md index abb7fe41ab7..aaabba04349 100644 --- a/src/librustc_error_codes/error_codes/E0009.md +++ b/src/librustc_error_codes/error_codes/E0009.md @@ -1,3 +1,5 @@ +#### Note: this error code is no longer emitted by the compiler. + In a pattern, all values that don't implement the `Copy` trait have to be bound the same way. The goal here is to avoid binding simultaneously by-move and by-ref. @@ -6,7 +8,9 @@ This limitation may be removed in a future version of Rust. Erroneous code example: -```compile_fail,E0009 +``` +#![feature(move_ref_pattern)] + struct X { x: (), } let x = Some((X { x: () }, X { x: () })); |
