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/test/ui/issues | |
| parent | a19edd6b161521a4f66716b3b45b8cf4d3f03f3a (diff) | |
| parent | d2b88b7050b0e21b136022c4cfe8d352c1425588 (diff) | |
| download | rust-f8d830b4decaef5a6ae0f27baac14dfb48baa4c5.tar.gz rust-f8d830b4decaef5a6ae0f27baac14dfb48baa4c5.zip | |
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/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-53840.rs | 20 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-53840.stderr | 20 |
2 files changed, 0 insertions, 40 deletions
diff --git a/src/test/ui/issues/issue-53840.rs b/src/test/ui/issues/issue-53840.rs deleted file mode 100644 index e854d24ab97..00000000000 --- a/src/test/ui/issues/issue-53840.rs +++ /dev/null @@ -1,20 +0,0 @@ -enum E { - Foo(String, String, String), -} - -struct Bar { - a: String, - b: String, -} - -fn main() { - let bar = Bar { a: "1".to_string(), b: "2".to_string() }; - match E::Foo("".into(), "".into(), "".into()) { - E::Foo(a, b, ref c) => {} -//~^ ERROR cannot bind by-move and by-ref in the same pattern - } - match bar { - Bar {a, ref b} => {} -//~^ ERROR cannot bind by-move and by-ref in the same pattern - } -} diff --git a/src/test/ui/issues/issue-53840.stderr b/src/test/ui/issues/issue-53840.stderr deleted file mode 100644 index 9cb034e7592..00000000000 --- a/src/test/ui/issues/issue-53840.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/issue-53840.rs:13:16 - | -LL | E::Foo(a, b, ref c) => {} - | ^ ^ ----- by-ref pattern here - | | | - | | by-move pattern here - | by-move pattern here - -error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/issue-53840.rs:17:14 - | -LL | Bar {a, ref b} => {} - | ^ ----- by-ref pattern here - | | - | by-move pattern here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0009`. |
