diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-15 05:06:54 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-23 14:47:20 +0100 |
| commit | 371446cc50ca5da670e8b2b66d08633f39a33a04 (patch) | |
| tree | 13cf1c49e6a4abe3a9f42fade04f0090d2f4df21 /src/test | |
| parent | 8846a6b6bb2dc9d776335fda01f68c9c1c7b94e6 (diff) | |
| download | rust-371446cc50ca5da670e8b2b66d08633f39a33a04.tar.gz rust-371446cc50ca5da670e8b2b66d08633f39a33a04.zip | |
Remove `bindings_after_at` from `INCOMPLETE_FEATURES`.
Diffstat (limited to 'src/test')
32 files changed, 153 insertions, 295 deletions
diff --git a/src/test/ui/error-codes/E0007.rs b/src/test/ui/error-codes/E0007.rs index 4f7fc0dc232..022ac5fc113 100644 --- a/src/test/ui/error-codes/E0007.rs +++ b/src/test/ui/error-codes/E0007.rs @@ -1,5 +1,4 @@ #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash fn main() { let x = Some("s".to_string()); diff --git a/src/test/ui/error-codes/E0007.stderr b/src/test/ui/error-codes/E0007.stderr index d7b8050c3a4..31af9171725 100644 --- a/src/test/ui/error-codes/E0007.stderr +++ b/src/test/ui/error-codes/E0007.stderr @@ -1,19 +1,11 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/E0007.rs:1:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/E0007.rs:7:9 + --> $DIR/E0007.rs:6:9 | LL | op_string @ Some(s) => {}, | ^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0382]: use of moved value - --> $DIR/E0007.rs:7:26 + --> $DIR/E0007.rs:6:26 | LL | let x = Some("s".to_string()); | - move occurs because `x` has type `std::option::Option<std::string::String>`, which does not implement the `Copy` trait diff --git a/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.rs b/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.rs index e86db3ab96f..75d7af58e70 100644 --- a/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.rs +++ b/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.rs @@ -3,7 +3,6 @@ // where one side is by-ref and the other is by-move. #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash struct X { x: () } diff --git a/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr b/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr index 658b77ed1ab..22d62ff4f00 100644 --- a/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr +++ b/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr @@ -1,13 +1,5 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:5:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:13:23 + --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:12:23 | LL | Some(ref _y @ _z) => { }, | ---------^^ @@ -16,13 +8,13 @@ LL | Some(ref _y @ _z) => { }, | by-ref pattern here error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:19:14 + --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:18:14 | LL | Some(_z @ ref _y) => { }, | ^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:26:27 + --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:25:27 | LL | Some(ref mut _y @ _z) => { }, | -------------^^ @@ -31,13 +23,13 @@ LL | Some(ref mut _y @ _z) => { }, | by-ref pattern here error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:32:14 + --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:31:14 | LL | Some(_z @ ref mut _y) => { }, | ^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0382]: borrow of moved value - --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:19:19 + --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:18:19 | LL | Some(_z @ ref _y) => { }, | -----^^^^^^ @@ -48,7 +40,7 @@ LL | Some(_z @ ref _y) => { }, = note: move occurs because value has type `X`, which does not implement the `Copy` trait error[E0382]: borrow of moved value - --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:32:19 + --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:31:19 | LL | Some(_z @ ref mut _y) => { }, | -----^^^^^^^^^^ diff --git a/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.rs b/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.rs index bfaab69a776..86fb04e2edf 100644 --- a/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.rs +++ b/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.rs @@ -1,7 +1,6 @@ // See issue #12534. #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash fn main() {} diff --git a/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr b/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr index 15b0d5e2cb4..b039708fd3e 100644 --- a/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr +++ b/src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr @@ -1,19 +1,11 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/bind-by-move-no-subbindings-fun-param.rs:3:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/bind-by-move-no-subbindings-fun-param.rs:10:6 + --> $DIR/bind-by-move-no-subbindings-fun-param.rs:9:6 | LL | fn f(a @ A(u): A) -> Box<u8> { | ^^^^^^^^ binds an already bound by-move value by moving it error[E0382]: use of moved value - --> $DIR/bind-by-move-no-subbindings-fun-param.rs:10:12 + --> $DIR/bind-by-move-no-subbindings-fun-param.rs:9:12 | LL | fn f(a @ A(u): A) -> Box<u8> { | ------^- diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.rs b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.rs index e0931f7e66e..1d9f341c514 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.rs +++ b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.rs @@ -1,7 +1,6 @@ // Test that moving on both sides of an `@` pattern is not allowed. #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash #![feature(slice_patterns)] fn main() { diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr index 605c92e5d8d..f3f8fd655ce 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr @@ -1,61 +1,53 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/borrowck-move-and-move.rs:3:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-move-and-move.rs:13:9 + --> $DIR/borrowck-move-and-move.rs:12:9 | LL | let a @ b = U; | ^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-move-and-move.rs:17:9 + --> $DIR/borrowck-move-and-move.rs:16:9 | LL | let a @ (b, c) = (U, U); | ^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-move-and-move.rs:21:9 + --> $DIR/borrowck-move-and-move.rs:20:9 | LL | let a @ (b, c) = (u(), u()); | ^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-move-and-move.rs:26:9 + --> $DIR/borrowck-move-and-move.rs:25:9 | LL | a @ Ok(b) | a @ Err(b) => {} | ^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-move-and-move.rs:26:21 + --> $DIR/borrowck-move-and-move.rs:25:21 | LL | a @ Ok(b) | a @ Err(b) => {} | ^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-move-and-move.rs:38:9 + --> $DIR/borrowck-move-and-move.rs:37:9 | LL | xs @ [a, .., b] => {} | ^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-move-and-move.rs:44:9 + --> $DIR/borrowck-move-and-move.rs:43:9 | LL | xs @ [_, ys @ .., _] => {} | ^^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-move-and-move.rs:33:12 + --> $DIR/borrowck-move-and-move.rs:32:12 | LL | fn fun(a @ b: U) {} | ^^^^^ binds an already bound by-move value by moving it error[E0382]: use of moved value - --> $DIR/borrowck-move-and-move.rs:13:13 + --> $DIR/borrowck-move-and-move.rs:12:13 | LL | let a @ b = U; | ----^ - move occurs because value has type `main::U`, which does not implement the `Copy` trait @@ -64,7 +56,7 @@ LL | let a @ b = U; | value moved here error[E0382]: use of moved value - --> $DIR/borrowck-move-and-move.rs:17:17 + --> $DIR/borrowck-move-and-move.rs:16:17 | LL | let a @ (b, c) = (U, U); | --------^- ------ move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait @@ -73,7 +65,7 @@ LL | let a @ (b, c) = (U, U); | value moved here error[E0382]: use of moved value - --> $DIR/borrowck-move-and-move.rs:21:17 + --> $DIR/borrowck-move-and-move.rs:20:17 | LL | let a @ (b, c) = (u(), u()); | --------^- ---------- move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait @@ -82,7 +74,7 @@ LL | let a @ (b, c) = (u(), u()); | value moved here error[E0382]: use of moved value - --> $DIR/borrowck-move-and-move.rs:26:16 + --> $DIR/borrowck-move-and-move.rs:25:16 | LL | match Ok(U) { | ----- move occurs because value has type `std::result::Result<main::U, main::U>`, which does not implement the `Copy` trait @@ -93,7 +85,7 @@ LL | a @ Ok(b) | a @ Err(b) => {} | value moved here error[E0382]: use of moved value - --> $DIR/borrowck-move-and-move.rs:26:29 + --> $DIR/borrowck-move-and-move.rs:25:29 | LL | match Ok(U) { | ----- move occurs because value has type `std::result::Result<main::U, main::U>`, which does not implement the `Copy` trait @@ -104,7 +96,7 @@ LL | a @ Ok(b) | a @ Err(b) => {} | value moved here error[E0382]: use of moved value - --> $DIR/borrowck-move-and-move.rs:38:22 + --> $DIR/borrowck-move-and-move.rs:37:22 | LL | match [u(), u(), u(), u()] { | -------------------- move occurs because value has type `[main::U; 4]`, which does not implement the `Copy` trait @@ -115,7 +107,7 @@ LL | xs @ [a, .., b] => {} | value moved here error[E0382]: use of moved value - --> $DIR/borrowck-move-and-move.rs:44:18 + --> $DIR/borrowck-move-and-move.rs:43:18 | LL | match [u(), u(), u(), u()] { | -------------------- move occurs because value has type `[main::U; 4]`, which does not implement the `Copy` trait @@ -126,7 +118,7 @@ LL | xs @ [_, ys @ .., _] => {} | value moved here error[E0382]: use of moved value - --> $DIR/borrowck-move-and-move.rs:33:16 + --> $DIR/borrowck-move-and-move.rs:32:16 | LL | fn fun(a @ b: U) {} | ----^ diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs index d88ca2459bb..afac8d990b4 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs @@ -3,7 +3,6 @@ // Test `@` patterns combined with `box` patterns. #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash #![feature(box_patterns)] #![feature(slice_patterns)] diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.stderr deleted file mode 100644 index e981b3428a7..00000000000 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.stderr +++ /dev/null @@ -1,8 +0,0 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/borrowck-pat-at-and-box-pass.rs:5:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.rs b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.rs index 32fb962b55c..fce31409e16 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.rs +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.rs @@ -1,7 +1,6 @@ // Test `@` patterns combined with `box` patterns. #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash #![feature(box_patterns)] #![feature(slice_patterns)] diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr index 05e80085e6b..5772fadd1e7 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr @@ -1,31 +1,23 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/borrowck-pat-at-and-box.rs:3:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-pat-at-and-box.rs:18:9 + --> $DIR/borrowck-pat-at-and-box.rs:17:9 | LL | let a @ box &b = Box::new(&C); | ^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-pat-at-and-box.rs:22:9 + --> $DIR/borrowck-pat-at-and-box.rs:21:9 | LL | let a @ box b = Box::new(C); | ^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-pat-at-and-box.rs:34:25 + --> $DIR/borrowck-pat-at-and-box.rs:33:25 | LL | match Box::new(C) { a @ box b => {} } | ^^^^^^^^^ binds an already bound by-move value by moving it error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/borrowck-pat-at-and-box.rs:38:21 + --> $DIR/borrowck-pat-at-and-box.rs:37:21 | LL | let ref a @ box b = Box::new(NC); | ------------^ @@ -34,7 +26,7 @@ LL | let ref a @ box b = Box::new(NC); | by-ref pattern here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-at-and-box.rs:40:9 + --> $DIR/borrowck-pat-at-and-box.rs:39:9 | LL | let ref a @ box ref mut b = Box::new(nc()); | -----^^^^^^^--------- @@ -43,7 +35,7 @@ LL | let ref a @ box ref mut b = Box::new(nc()); | immutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-at-and-box.rs:42:9 + --> $DIR/borrowck-pat-at-and-box.rs:41:9 | LL | let ref a @ box ref mut b = Box::new(NC); | -----^^^^^^^--------- @@ -52,7 +44,7 @@ LL | let ref a @ box ref mut b = Box::new(NC); | immutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-at-and-box.rs:44:9 + --> $DIR/borrowck-pat-at-and-box.rs:43:9 | LL | let ref a @ box ref mut b = Box::new(NC); | -----^^^^^^^--------- @@ -61,7 +53,7 @@ LL | let ref a @ box ref mut b = Box::new(NC); | immutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-at-and-box.rs:47:9 + --> $DIR/borrowck-pat-at-and-box.rs:46:9 | LL | let ref a @ box ref mut b = Box::new(NC); | -----^^^^^^^--------- @@ -70,7 +62,7 @@ LL | let ref a @ box ref mut b = Box::new(NC); | immutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-at-and-box.rs:53:9 + --> $DIR/borrowck-pat-at-and-box.rs:52:9 | LL | let ref mut a @ box ref b = Box::new(NC); | ---------^^^^^^^----- @@ -79,7 +71,7 @@ LL | let ref mut a @ box ref b = Box::new(NC); | mutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-at-and-box.rs:67:9 + --> $DIR/borrowck-pat-at-and-box.rs:66:9 | LL | ref mut a @ box ref b => { | ---------^^^^^^^----- @@ -88,7 +80,7 @@ LL | ref mut a @ box ref b => { | mutable borrow occurs here error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/borrowck-pat-at-and-box.rs:76:38 + --> $DIR/borrowck-pat-at-and-box.rs:75:38 | LL | box [Ok(a), ref xs @ .., Err(b)] => {} | ----------- ^ by-move pattern here @@ -96,7 +88,7 @@ LL | box [Ok(a), ref xs @ .., Err(b)] => {} | by-ref pattern here error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/borrowck-pat-at-and-box.rs:82:46 + --> $DIR/borrowck-pat-at-and-box.rs:81:46 | LL | [Ok(box ref a), ref xs @ .., Err(box b), Err(box ref mut c)] => {} | ----- ----------- ^ --------- by-ref pattern here @@ -106,19 +98,19 @@ LL | [Ok(box ref a), ref xs @ .., Err(box b), Err(box ref mut c)] => {} | by-ref pattern here error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-pat-at-and-box.rs:26:11 + --> $DIR/borrowck-pat-at-and-box.rs:25:11 | LL | fn f1(a @ box &b: Box<&C>) {} | ^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-pat-at-and-box.rs:30:11 + --> $DIR/borrowck-pat-at-and-box.rs:29:11 | LL | fn f2(a @ box b: Box<C>) {} | ^^^^^^^^^ binds an already bound by-move value by moving it error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-at-and-box.rs:59:11 + --> $DIR/borrowck-pat-at-and-box.rs:58:11 | LL | fn f5(ref mut a @ box ref b: Box<NC>) { | ---------^^^^^^^----- @@ -127,7 +119,7 @@ LL | fn f5(ref mut a @ box ref b: Box<NC>) { | mutable borrow occurs here error[E0382]: use of moved value - --> $DIR/borrowck-pat-at-and-box.rs:18:18 + --> $DIR/borrowck-pat-at-and-box.rs:17:18 | LL | let a @ box &b = Box::new(&C); | ---------^ ------------ move occurs because value has type `std::boxed::Box<&C>`, which does not implement the `Copy` trait @@ -136,7 +128,7 @@ LL | let a @ box &b = Box::new(&C); | value moved here error[E0382]: use of moved value - --> $DIR/borrowck-pat-at-and-box.rs:22:17 + --> $DIR/borrowck-pat-at-and-box.rs:21:17 | LL | let a @ box b = Box::new(C); | --------^ ----------- move occurs because value has type `std::boxed::Box<C>`, which does not implement the `Copy` trait @@ -145,7 +137,7 @@ LL | let a @ box b = Box::new(C); | value moved here error[E0382]: use of moved value - --> $DIR/borrowck-pat-at-and-box.rs:34:33 + --> $DIR/borrowck-pat-at-and-box.rs:33:33 | LL | match Box::new(C) { a @ box b => {} } | ----------- --------^ @@ -155,7 +147,7 @@ LL | match Box::new(C) { a @ box b => {} } | move occurs because value has type `std::boxed::Box<C>`, which does not implement the `Copy` trait error[E0502]: cannot borrow `_` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-at-and-box.rs:47:21 + --> $DIR/borrowck-pat-at-and-box.rs:46:21 | LL | let ref a @ box ref mut b = Box::new(NC); | ------------^^^^^^^^^ @@ -167,7 +159,7 @@ LL | drop(a); | - immutable borrow later used here error[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-at-and-box.rs:53:25 + --> $DIR/borrowck-pat-at-and-box.rs:52:25 | LL | let ref mut a @ box ref b = Box::new(NC); | ----------------^^^^^ @@ -179,7 +171,7 @@ LL | *a = Box::new(NC); | -- mutable borrow later used here error[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-at-and-box.rs:67:25 + --> $DIR/borrowck-pat-at-and-box.rs:66:25 | LL | ref mut a @ box ref b => { | ----------------^^^^^ @@ -191,7 +183,7 @@ LL | *a = Box::new(NC); | -- mutable borrow later used here error[E0382]: use of moved value - --> $DIR/borrowck-pat-at-and-box.rs:26:20 + --> $DIR/borrowck-pat-at-and-box.rs:25:20 | LL | fn f1(a @ box &b: Box<&C>) {} | ---------^ @@ -201,7 +193,7 @@ LL | fn f1(a @ box &b: Box<&C>) {} | move occurs because value has type `std::boxed::Box<&C>`, which does not implement the `Copy` trait error[E0382]: use of moved value - --> $DIR/borrowck-pat-at-and-box.rs:30:19 + --> $DIR/borrowck-pat-at-and-box.rs:29:19 | LL | fn f2(a @ box b: Box<C>) {} | --------^ @@ -211,7 +203,7 @@ LL | fn f2(a @ box b: Box<C>) {} | move occurs because value has type `std::boxed::Box<C>`, which does not implement the `Copy` trait error[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-at-and-box.rs:59:27 + --> $DIR/borrowck-pat-at-and-box.rs:58:27 | LL | fn f5(ref mut a @ box ref b: Box<NC>) { | ----------------^^^^^ diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs index f88286916bc..be19e5f2a85 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs @@ -4,7 +4,6 @@ #![feature(slice_patterns)] #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash #[derive(Copy, Clone)] struct C; diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.stderr deleted file mode 100644 index e5bbc112bb1..00000000000 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.stderr +++ /dev/null @@ -1,8 +0,0 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/borrowck-pat-by-copy-bindings-in-at.rs:6:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.rs b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.rs index 5852e307229..abe5ed81b71 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.rs +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.rs @@ -1,5 +1,4 @@ #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash fn main() { match Some("hi".to_string()) { diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr index 36dc1b28792..1f70a6c437e 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr @@ -1,13 +1,5 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/borrowck-pat-by-move-and-ref.rs:1:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/borrowck-pat-by-move-and-ref.rs:6:34 + --> $DIR/borrowck-pat-by-move-and-ref.rs:5:34 | LL | ref op_string_ref @ Some(s) => {}, | -------------------------^- diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs index a09364920f6..edf9fb31458 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs @@ -4,7 +4,6 @@ // of an `@` pattern according to NLL borrowck. #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash #![feature(slice_patterns)] fn main() { diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.stderr deleted file mode 100644 index 7a500df77cd..00000000000 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.stderr +++ /dev/null @@ -1,8 +0,0 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/borrowck-pat-ref-both-sides.rs:6:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.rs b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.rs index d2e82191784..88eda9afec7 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.rs +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.rs @@ -1,5 +1,4 @@ #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash #![feature(slice_patterns)] enum Option<T> { diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr index 931b3e3c83c..b068a6125b6 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr @@ -1,13 +1,5 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:1:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error: cannot borrow `z` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:12:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:11:9 | LL | ref mut z @ &mut Some(ref a) => { | ---------^^^^^^^^^^^^^-----^ @@ -16,7 +8,7 @@ LL | ref mut z @ &mut Some(ref a) => { | mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:33:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:32:9 | LL | let ref mut a @ (ref b @ ref mut c) = u(); // sub-in-sub | ---------^^^^-----------------^ @@ -26,7 +18,7 @@ LL | let ref mut a @ (ref b @ ref mut c) = u(); // sub-in-sub | first mutable borrow occurs here error: cannot borrow `b` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:33:22 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:32:22 | LL | let ref mut a @ (ref b @ ref mut c) = u(); // sub-in-sub | -----^^^--------- @@ -35,7 +27,7 @@ LL | let ref mut a @ (ref b @ ref mut c) = u(); // sub-in-sub | immutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:37:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:36:9 | LL | let ref a @ ref mut b = U; | -----^^^--------- @@ -44,7 +36,7 @@ LL | let ref a @ ref mut b = U; | immutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:39:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:38:9 | LL | let ref mut a @ ref b = U; | ---------^^^----- @@ -53,7 +45,7 @@ LL | let ref mut a @ ref b = U; | mutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:41:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:40:9 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); | -----^^^^---------^^---------^ @@ -63,7 +55,7 @@ LL | let ref a @ (ref mut b, ref mut c) = (U, U); | immutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:43:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:42:9 | LL | let ref mut a @ (ref b, ref c) = (U, U); | ---------^^^^-----^^-----^ @@ -73,7 +65,7 @@ LL | let ref mut a @ (ref b, ref c) = (U, U); | mutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:46:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:45:9 | LL | let ref mut a @ ref b = u(); | ---------^^^----- @@ -82,7 +74,7 @@ LL | let ref mut a @ ref b = u(); | mutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:51:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:50:9 | LL | let ref a @ ref mut b = u(); | -----^^^--------- @@ -91,7 +83,7 @@ LL | let ref a @ ref mut b = u(); | immutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:57:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:56:9 | LL | let ref mut a @ ref b = U; | ---------^^^----- @@ -100,7 +92,7 @@ LL | let ref mut a @ ref b = U; | mutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:61:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:60:9 | LL | let ref a @ ref mut b = U; | -----^^^--------- @@ -109,7 +101,7 @@ LL | let ref a @ ref mut b = U; | immutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:67:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:66:9 | LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) => { | ---------^^^^^^-----^ @@ -118,7 +110,7 @@ LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) => { | mutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:67:33 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:66:33 | LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) => { | ---------^^^^^^^-----^ @@ -127,7 +119,7 @@ LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) => { | mutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:76:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:75:9 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) => { | -----^^^^^^---------^ @@ -136,7 +128,7 @@ LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) => { | immutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:76:33 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:75:33 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) => { | -----^^^^^^^---------^ @@ -145,7 +137,7 @@ LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) => { | immutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:87:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:86:9 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { *b = U; false } => {} | -----^^^^^^---------^ @@ -154,7 +146,7 @@ LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { *b = U; false } | immutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:87:33 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:86:33 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { *b = U; false } => {} | -----^^^^^^^---------^ @@ -163,7 +155,7 @@ LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { *b = U; false } | immutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:94:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:93:9 | LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { *a = Err(U); false } => {} | ---------^^^^^^-----^ @@ -172,7 +164,7 @@ LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { *a = Err(U); fa | mutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:94:33 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:93:33 | LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { *a = Err(U); false } => {} | ---------^^^^^^^-----^ @@ -181,7 +173,7 @@ LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { *a = Err(U); fa | mutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:101:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:100:9 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { drop(b); false } => {} | -----^^^^^^---------^ @@ -190,7 +182,7 @@ LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { drop(b); false | immutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:101:33 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:100:33 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { drop(b); false } => {} | -----^^^^^^^---------^ @@ -199,7 +191,7 @@ LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { drop(b); false | immutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:108:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:107:9 | LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { drop(a); false } => {} | ---------^^^^^^-----^ @@ -208,7 +200,7 @@ LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { drop(a); false | mutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:108:33 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:107:33 | LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { drop(a); false } => {} | ---------^^^^^^^-----^ @@ -217,7 +209,7 @@ LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { drop(a); false | mutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:115:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:114:9 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); | -----^^^^---------^^---------^ @@ -227,7 +219,7 @@ LL | let ref a @ (ref mut b, ref mut c) = (U, U); | immutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:120:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:119:9 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); | -----^^^^---------^^---------^ @@ -237,7 +229,7 @@ LL | let ref a @ (ref mut b, ref mut c) = (U, U); | immutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:127:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:126:9 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); | -----^^^^---------^^---------^ @@ -247,7 +239,7 @@ LL | let ref a @ (ref mut b, ref mut c) = (U, U); | immutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:132:9 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:131:9 | LL | let ref mut a @ (ref b, ref c) = (U, U); | ---------^^^^-----^^-----^ @@ -257,7 +249,7 @@ LL | let ref mut a @ (ref b, ref c) = (U, U); | mutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:26:11 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:25:11 | LL | fn f1(ref a @ ref mut b: U) {} | -----^^^--------- @@ -266,7 +258,7 @@ LL | fn f1(ref a @ ref mut b: U) {} | immutable borrow occurs here error: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:28:11 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:27:11 | LL | fn f2(ref mut a @ ref b: U) {} | ---------^^^----- @@ -275,7 +267,7 @@ LL | fn f2(ref mut a @ ref b: U) {} | mutable borrow occurs here error: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:30:11 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:29:11 | LL | fn f3(ref a @ [ref b, ref mut mid @ .., ref c]: [U; 4]) {} | -----^^^^^^^^^^^----------------^^^^^^^^ @@ -284,7 +276,7 @@ LL | fn f3(ref a @ [ref b, ref mut mid @ .., ref c]: [U; 4]) {} | immutable borrow occurs here error[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:12:31 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:11:31 | LL | ref mut z @ &mut Some(ref a) => { | ----------------------^^^^^- @@ -296,7 +288,7 @@ LL | **z = None; | ---------- mutable borrow later used here error[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:46:21 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:45:21 | LL | let ref mut a @ ref b = u(); | ------------^^^^^ @@ -308,7 +300,7 @@ LL | *a = u(); | -------- mutable borrow later used here error[E0502]: cannot borrow `_` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:51:17 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:50:17 | LL | let ref a @ ref mut b = u(); | --------^^^^^^^^^ @@ -320,7 +312,7 @@ LL | drop(a); | - immutable borrow later used here error[E0502]: cannot borrow `_` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:76:20 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:75:20 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) => { | -----------^^^^^^^^^- @@ -332,7 +324,7 @@ LL | drop(a); | - immutable borrow later used here error[E0502]: cannot borrow `_` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:76:45 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:75:45 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) => { | ------------^^^^^^^^^- @@ -344,7 +336,7 @@ LL | drop(a); | - immutable borrow later used here error[E0594]: cannot assign to `*b`, as it is immutable for the pattern guard - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:87:61 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:86:61 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { *b = U; false } => {} | ^^^^^^ cannot assign @@ -352,7 +344,7 @@ LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { *b = U; false } = note: variables bound in patterns are immutable until the end of the pattern guard error[E0594]: cannot assign to `*a`, as it is immutable for the pattern guard - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:94:61 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:93:61 | LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { *a = Err(U); false } => {} | ^^^^^^^^^^^ cannot assign @@ -360,7 +352,7 @@ LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { *a = Err(U); fa = note: variables bound in patterns are immutable until the end of the pattern guard error[E0507]: cannot move out of `b` in pattern guard - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:101:66 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:100:66 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { drop(b); false } => {} | ^ move occurs because `b` has type `&mut main::U`, which does not implement the `Copy` trait @@ -368,7 +360,7 @@ LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { drop(b); false = note: variables bound in patterns cannot be moved from until after the end of the pattern guard error[E0507]: cannot move out of `a` in pattern guard - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:108:66 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:107:66 | LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { drop(a); false } => {} | ^ move occurs because `a` has type `&mut std::result::Result<main::U, main::U>`, which does not implement the `Copy` trait @@ -376,7 +368,7 @@ LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { drop(a); false = note: variables bound in patterns cannot be moved from until after the end of the pattern guard error[E0502]: cannot borrow `_` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:120:18 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:119:18 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); | ---------^^^^^^^^^------------ @@ -388,7 +380,7 @@ LL | drop(a); | - immutable borrow later used here error[E0502]: cannot borrow `_` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:120:29 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:119:29 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); | --------------------^^^^^^^^^- @@ -400,7 +392,7 @@ LL | drop(a); | - immutable borrow later used here error[E0502]: cannot borrow `_` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:127:18 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:126:18 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); | ---------^^^^^^^^^------------ @@ -412,7 +404,7 @@ LL | drop(a); | - immutable borrow later used here error[E0502]: cannot borrow `_` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-pat-ref-mut-and-ref.rs:127:29 + --> $DIR/borrowck-pat-ref-mut-and-ref.rs:126:29 | LL | let ref a @ (ref mut b, ref mut c) = (U, U); | --------------------^^^^^^^^^- diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.rs b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.rs index da032797c31..6b8b7545e68 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.rs +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.rs @@ -1,7 +1,6 @@ // Test that `ref mut x @ ref mut y` and varieties of that are not allowed. #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash #![feature(slice_patterns)] fn main() { diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr index 365893512e2..1b5e6c74117 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr @@ -1,13 +1,5 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/borrowck-pat-ref-mut-twice.rs:3:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:26:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:25:9 | LL | let ref mut a @ ref mut b = U; | ---------^^^--------- @@ -16,7 +8,7 @@ LL | let ref mut a @ ref mut b = U; | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:30:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:29:9 | LL | let ref mut a @ ref mut b = U; | ---------^^^--------- @@ -25,7 +17,7 @@ LL | let ref mut a @ ref mut b = U; | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:33:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:32:9 | LL | let ref mut a @ ref mut b = U; | ---------^^^--------- @@ -34,7 +26,7 @@ LL | let ref mut a @ ref mut b = U; | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:36:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:35:9 | LL | let ref mut a @ ref mut b = U; | ---------^^^--------- @@ -43,7 +35,7 @@ LL | let ref mut a @ ref mut b = U; | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:40:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:39:9 | LL | let ref mut a @ ref mut b = U; | ---------^^^--------- @@ -52,7 +44,7 @@ LL | let ref mut a @ ref mut b = U; | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:44:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:43:9 | LL | let ref mut a @ ( | ^-------- @@ -74,7 +66,7 @@ LL | | ) = (U, [U, U, U]); | |_____^ error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:54:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:53:9 | LL | let ref mut a @ ( | ^-------- @@ -96,31 +88,31 @@ LL | | ) = (u(), [u(), u(), u()]); | |_________^ error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-pat-ref-mut-twice.rs:64:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:63:9 | LL | let a @ (ref mut b, ref mut c) = (U, U); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-pat-ref-mut-twice.rs:68:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:67:9 | LL | let a @ (b, [c, d]) = &mut val; // Same as ^-- | ^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-pat-ref-mut-twice.rs:72:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:71:9 | LL | let a @ &mut ref mut b = &mut U; | ^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/borrowck-pat-ref-mut-twice.rs:75:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:74:9 | LL | let a @ &mut (ref mut b, ref mut c) = &mut (U, U); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:80:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:79:9 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ---------^^^^^^---------^ @@ -129,7 +121,7 @@ LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:80:37 + --> $DIR/borrowck-pat-ref-mut-twice.rs:79:37 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ---------^^^^^^^---------^ @@ -138,7 +130,7 @@ LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:86:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:85:9 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ---------^^^^^^---------^ @@ -147,7 +139,7 @@ LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:86:37 + --> $DIR/borrowck-pat-ref-mut-twice.rs:85:37 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ---------^^^^^^^---------^ @@ -156,7 +148,7 @@ LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:93:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:92:9 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ---------^^^^^^---------^ @@ -165,7 +157,7 @@ LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:93:37 + --> $DIR/borrowck-pat-ref-mut-twice.rs:92:37 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ---------^^^^^^^---------^ @@ -174,7 +166,7 @@ LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:105:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:104:9 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ---------^^^^^^---------^ @@ -183,7 +175,7 @@ LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:105:37 + --> $DIR/borrowck-pat-ref-mut-twice.rs:104:37 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ---------^^^^^^^---------^ @@ -192,7 +184,7 @@ LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:12:11 + --> $DIR/borrowck-pat-ref-mut-twice.rs:11:11 | LL | fn f1(ref mut a @ ref mut b: U) {} | ---------^^^--------- @@ -201,7 +193,7 @@ LL | fn f1(ref mut a @ ref mut b: U) {} | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:14:11 + --> $DIR/borrowck-pat-ref-mut-twice.rs:13:11 | LL | fn f2(ref mut a @ ref mut b: U) {} | ---------^^^--------- @@ -210,7 +202,7 @@ LL | fn f2(ref mut a @ ref mut b: U) {} | first mutable borrow occurs here error: cannot borrow `a` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:17:9 + --> $DIR/borrowck-pat-ref-mut-twice.rs:16:9 | LL | ref mut a @ [ | ^-------- @@ -228,7 +220,7 @@ LL | | ] : [[U; 4]; 5] | |_________^ error[E0499]: cannot borrow `_` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:26:21 + --> $DIR/borrowck-pat-ref-mut-twice.rs:25:21 | LL | let ref mut a @ ref mut b = U; | ------------^^^^^^^^^ @@ -240,7 +232,7 @@ LL | drop(a); | - first borrow later used here error[E0499]: cannot borrow `_` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:36:21 + --> $DIR/borrowck-pat-ref-mut-twice.rs:35:21 | LL | let ref mut a @ ref mut b = U; | ------------^^^^^^^^^ @@ -252,7 +244,7 @@ LL | *a = U; | ------ first borrow later used here error[E0382]: borrow of moved value - --> $DIR/borrowck-pat-ref-mut-twice.rs:64:25 + --> $DIR/borrowck-pat-ref-mut-twice.rs:63:25 | LL | let a @ (ref mut b, ref mut c) = (U, U); | ----------------^^^^^^^^^- ------ move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait @@ -261,7 +253,7 @@ LL | let a @ (ref mut b, ref mut c) = (U, U); | value moved here error[E0382]: borrow of moved value - --> $DIR/borrowck-pat-ref-mut-twice.rs:68:21 + --> $DIR/borrowck-pat-ref-mut-twice.rs:67:21 | LL | let a @ (b, [c, d]) = &mut val; // Same as ^-- | ------------^-- -------- move occurs because value has type `&mut (main::U, [main::U; 2])`, which does not implement the `Copy` trait @@ -270,7 +262,7 @@ LL | let a @ (b, [c, d]) = &mut val; // Same as ^-- | value moved here error[E0382]: borrow of moved value - --> $DIR/borrowck-pat-ref-mut-twice.rs:72:18 + --> $DIR/borrowck-pat-ref-mut-twice.rs:71:18 | LL | let a @ &mut ref mut b = &mut U; | ---------^^^^^^^^^ ------ move occurs because value has type `&mut main::U`, which does not implement the `Copy` trait @@ -279,7 +271,7 @@ LL | let a @ &mut ref mut b = &mut U; | value moved here error[E0382]: borrow of moved value - --> $DIR/borrowck-pat-ref-mut-twice.rs:75:30 + --> $DIR/borrowck-pat-ref-mut-twice.rs:74:30 | LL | let a @ &mut (ref mut b, ref mut c) = &mut (U, U); | ---------------------^^^^^^^^^- ----------- move occurs because value has type `&mut (main::U, main::U)`, which does not implement the `Copy` trait @@ -288,7 +280,7 @@ LL | let a @ &mut (ref mut b, ref mut c) = &mut (U, U); | value moved here error[E0499]: cannot borrow `_` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:93:24 + --> $DIR/borrowck-pat-ref-mut-twice.rs:92:24 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ---------------^^^^^^^^^- @@ -300,7 +292,7 @@ LL | *a = Err(U); | ----------- first borrow later used here error[E0499]: cannot borrow `_` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:93:53 + --> $DIR/borrowck-pat-ref-mut-twice.rs:92:53 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ----------------^^^^^^^^^- @@ -312,7 +304,7 @@ LL | *a = Err(U); | ----------- first borrow later used here error[E0499]: cannot borrow `_` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:105:24 + --> $DIR/borrowck-pat-ref-mut-twice.rs:104:24 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ---------------^^^^^^^^^- @@ -324,7 +316,7 @@ LL | drop(a); | - first borrow later used here error[E0499]: cannot borrow `_` as mutable more than once at a time - --> $DIR/borrowck-pat-ref-mut-twice.rs:105:53 + --> $DIR/borrowck-pat-ref-mut-twice.rs:104:53 | LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => { | ----------------^^^^^^^^^- diff --git a/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.rs b/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.rs index b517ed71c73..db5aabc7a14 100644 --- a/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.rs +++ b/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.rs @@ -1,7 +1,6 @@ // Test that mixing `Copy` and non-`Copy` types in `@` patterns is forbidden. #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash #[derive(Copy, Clone)] struct C; diff --git a/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr b/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr index 89993a48e19..cfc35d6c32a 100644 --- a/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr +++ b/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr @@ -1,31 +1,23 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/copy-and-move-mixed.rs:3:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/copy-and-move-mixed.rs:12:9 + --> $DIR/copy-and-move-mixed.rs:11:9 | LL | let a @ NC(b, c) = NC(C, C); | ^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/copy-and-move-mixed.rs:16:9 + --> $DIR/copy-and-move-mixed.rs:15:9 | LL | let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C)); | ^^^^^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0007]: cannot bind by-move with sub-bindings - --> $DIR/copy-and-move-mixed.rs:16:19 + --> $DIR/copy-and-move-mixed.rs:15:19 | LL | let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C)); | ^^^^^^^^^^^^ binds an already bound by-move value by moving it error[E0382]: use of moved value - --> $DIR/copy-and-move-mixed.rs:12:19 + --> $DIR/copy-and-move-mixed.rs:11:19 | LL | let a @ NC(b, c) = NC(C, C); | ----------^- -------- move occurs because value has type `NC<C, C>`, which does not implement the `Copy` trait @@ -34,7 +26,7 @@ LL | let a @ NC(b, c) = NC(C, C); | value moved here error[E0382]: use of moved value - --> $DIR/copy-and-move-mixed.rs:16:19 + --> $DIR/copy-and-move-mixed.rs:15:19 | LL | let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C)); | ----------^^^^^^^^^^^^- --------------- move occurs because value has type `NC<C, NC<C, C>>`, which does not implement the `Copy` trait @@ -43,7 +35,7 @@ LL | let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C)); | value moved here error[E0382]: use of moved value - --> $DIR/copy-and-move-mixed.rs:16:29 + --> $DIR/copy-and-move-mixed.rs:15:29 | LL | let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C)); | ----------^- diff --git a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.rs b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.rs index ba2eb7a0383..1127d114145 100644 --- a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.rs +++ b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.rs @@ -8,7 +8,6 @@ // this would create problems for the generalization aforementioned. #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash fn main() { struct NotCopy; diff --git a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr index 0a20a991a9a..b6709a8a40e 100644 --- a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr +++ b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr @@ -1,13 +1,5 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/default-binding-modes-both-sides-independent.rs:10:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/default-binding-modes-both-sides-independent.rs:28:17 + --> $DIR/default-binding-modes-both-sides-independent.rs:27:17 | LL | let ref a @ b = NotCopy; | --------^ @@ -16,7 +8,7 @@ LL | let ref a @ b = NotCopy; | by-ref pattern here error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/default-binding-modes-both-sides-independent.rs:29:21 + --> $DIR/default-binding-modes-both-sides-independent.rs:28:21 | LL | let ref mut a @ b = NotCopy; | ------------^ @@ -25,7 +17,7 @@ LL | let ref mut a @ b = NotCopy; | by-ref pattern here error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/default-binding-modes-both-sides-independent.rs:31:20 + --> $DIR/default-binding-modes-both-sides-independent.rs:30:20 | LL | Ok(ref a @ b) | Err(ref a @ b) => {} | --------^ --------^ @@ -36,7 +28,7 @@ LL | Ok(ref a @ b) | Err(ref a @ b) => {} | by-ref pattern here error[E0009]: cannot bind by-move and by-ref in the same pattern - --> $DIR/default-binding-modes-both-sides-independent.rs:35:17 + --> $DIR/default-binding-modes-both-sides-independent.rs:34:17 | LL | ref a @ b => {} | --------^ diff --git a/src/test/ui/pattern/bindings-after-at/nested-patterns.rs b/src/test/ui/pattern/bindings-after-at/nested-patterns.rs index 63e07842b1a..6296652c112 100644 --- a/src/test/ui/pattern/bindings-after-at/nested-patterns.rs +++ b/src/test/ui/pattern/bindings-after-at/nested-patterns.rs @@ -1,7 +1,6 @@ // run-pass #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash struct A { a: u8, b: u8 } diff --git a/src/test/ui/pattern/bindings-after-at/nested-patterns.stderr b/src/test/ui/pattern/bindings-after-at/nested-patterns.stderr deleted file mode 100644 index 1864a8e2af7..00000000000 --- a/src/test/ui/pattern/bindings-after-at/nested-patterns.stderr +++ /dev/null @@ -1,8 +0,0 @@ -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/nested-patterns.rs:3:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - diff --git a/src/test/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.rs b/src/test/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.rs index 493f1cbb470..dbec2f135fb 100644 --- a/src/test/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.rs +++ b/src/test/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.rs @@ -2,7 +2,6 @@ // not in the top position of a ascribing a let binding or function parameter. #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete // This has no effect. // We include it to demonstrate that this is the case: diff --git a/src/test/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.stderr b/src/test/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.stderr index cdd1574f2b6..1e957ed0689 100644 --- a/src/test/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.stderr +++ b/src/test/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.stderr @@ -1,34 +1,26 @@ error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found `@` - --> $DIR/nested-type-ascription-syntactically-invalid.rs:20:15 + --> $DIR/nested-type-ascription-syntactically-invalid.rs:19:15 | LL | let a: u8 @ b = 0; | ^ expected one of 7 possible tokens error: expected one of `)`, `,`, `@`, or `|`, found `:` - --> $DIR/nested-type-ascription-syntactically-invalid.rs:26:15 + --> $DIR/nested-type-ascription-syntactically-invalid.rs:25:15 | LL | let a @ (b: u8); | ^ expected one of `)`, `,`, `@`, or `|` error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found `)` - --> $DIR/nested-type-ascription-syntactically-invalid.rs:26:19 + --> $DIR/nested-type-ascription-syntactically-invalid.rs:25:19 | LL | let a @ (b: u8); | ^ expected one of 7 possible tokens error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found `@` - --> $DIR/nested-type-ascription-syntactically-invalid.rs:33:15 + --> $DIR/nested-type-ascription-syntactically-invalid.rs:32:15 | LL | let a: T1 @ Outer(b: T2); | ^ expected one of 7 possible tokens -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/nested-type-ascription-syntactically-invalid.rs:4:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - error: aborting due to 4 previous errors diff --git a/src/test/ui/pattern/bindings-after-at/pat-at-same-name-both.rs b/src/test/ui/pattern/bindings-after-at/pat-at-same-name-both.rs index f0be901e3da..89ea2d51819 100644 --- a/src/test/ui/pattern/bindings-after-at/pat-at-same-name-both.rs +++ b/src/test/ui/pattern/bindings-after-at/pat-at-same-name-both.rs @@ -2,7 +2,6 @@ // The code that is tested here lives in resolve (see `resolve_pattern_inner`). #![feature(bindings_after_at)] -//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash #![feature(or_patterns)] //~^ WARN the feature `or_patterns` is incomplete and may cause the compiler to crash diff --git a/src/test/ui/pattern/bindings-after-at/pat-at-same-name-both.stderr b/src/test/ui/pattern/bindings-after-at/pat-at-same-name-both.stderr index 34ae84c2a81..c568d2a3aa2 100644 --- a/src/test/ui/pattern/bindings-after-at/pat-at-same-name-both.stderr +++ b/src/test/ui/pattern/bindings-after-at/pat-at-same-name-both.stderr @@ -1,76 +1,70 @@ error[E0415]: identifier `a` is bound more than once in this parameter list - --> $DIR/pat-at-same-name-both.rs:10:14 + --> $DIR/pat-at-same-name-both.rs:9:14 | LL | fn f(a @ a @ a: ()) {} | ^ used as parameter more than once error[E0415]: identifier `a` is bound more than once in this parameter list - --> $DIR/pat-at-same-name-both.rs:10:18 + --> $DIR/pat-at-same-name-both.rs:9:18 | LL | fn f(a @ a @ a: ()) {} | ^ used as parameter more than once error[E0416]: identifier `a` is bound more than once in the same pattern - --> $DIR/pat-at-same-name-both.rs:15:20 + --> $DIR/pat-at-same-name-both.rs:14:20 | LL | Ok(a @ b @ a) | ^ used in a pattern more than once error[E0416]: identifier `a` is bound more than once in the same pattern - --> $DIR/pat-at-same-name-both.rs:17:23 + --> $DIR/pat-at-same-name-both.rs:16:23 | LL | | Err(a @ b @ a) | ^ used in a pattern more than once error[E0416]: identifier `a` is bound more than once in the same pattern - --> $DIR/pat-at-same-name-both.rs:22:13 + --> $DIR/pat-at-same-name-both.rs:21:13 | LL | let a @ a @ a = (); | ^ used in a pattern more than once error[E0416]: identifier `a` is bound more than once in the same pattern - --> $DIR/pat-at-same-name-both.rs:22:17 + --> $DIR/pat-at-same-name-both.rs:21:17 | LL | let a @ a @ a = (); | ^ used in a pattern more than once error[E0416]: identifier `a` is bound more than once in the same pattern - --> $DIR/pat-at-same-name-both.rs:25:21 + --> $DIR/pat-at-same-name-both.rs:24:21 | LL | let ref a @ ref a = (); | ^ used in a pattern more than once error[E0416]: identifier `a` is bound more than once in the same pattern - --> $DIR/pat-at-same-name-both.rs:27:29 + --> $DIR/pat-at-same-name-both.rs:26:29 | LL | let ref mut a @ ref mut a = (); | ^ used in a pattern more than once error[E0416]: identifier `a` is bound more than once in the same pattern - --> $DIR/pat-at-same-name-both.rs:30:17 + --> $DIR/pat-at-same-name-both.rs:29:17 | LL | let a @ (Ok(a) | Err(a)) = Ok(()); | ^ used in a pattern more than once error[E0416]: identifier `a` is bound more than once in the same pattern - --> $DIR/pat-at-same-name-both.rs:30:26 + --> $DIR/pat-at-same-name-both.rs:29:26 | LL | let a @ (Ok(a) | Err(a)) = Ok(()); | ^ used in a pattern more than once -warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash - --> $DIR/pat-at-same-name-both.rs:4:12 - | -LL | #![feature(bindings_after_at)] - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - warning: the feature `or_patterns` is incomplete and may cause the compiler to crash - --> $DIR/pat-at-same-name-both.rs:6:12 + --> $DIR/pat-at-same-name-both.rs:5:12 | LL | #![feature(or_patterns)] | ^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default error: aborting due to 10 previous errors |
