Skip to content

Commit 371446c

Browse files
committed
Remove bindings_after_at from INCOMPLETE_FEATURES.
1 parent 8846a6b commit 371446c

33 files changed

+153
-296
lines changed

src/librustc_feature/active.rs

-1
Original file line numberDiff line numberDiff line change
@@ -558,5 +558,4 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[
558558
sym::or_patterns,
559559
sym::let_chains,
560560
sym::raw_dylib,
561-
sym::bindings_after_at,
562561
];

src/test/ui/error-codes/E0007.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(bindings_after_at)]
2-
//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash
32

43
fn main() {
54
let x = Some("s".to_string());

src/test/ui/error-codes/E0007.stderr

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash
2-
--> $DIR/E0007.rs:1:12
3-
|
4-
LL | #![feature(bindings_after_at)]
5-
| ^^^^^^^^^^^^^^^^^
6-
|
7-
= note: `#[warn(incomplete_features)]` on by default
8-
91
error[E0007]: cannot bind by-move with sub-bindings
10-
--> $DIR/E0007.rs:7:9
2+
--> $DIR/E0007.rs:6:9
113
|
124
LL | op_string @ Some(s) => {},
135
| ^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
146

157
error[E0382]: use of moved value
16-
--> $DIR/E0007.rs:7:26
8+
--> $DIR/E0007.rs:6:26
179
|
1810
LL | let x = Some("s".to_string());
1911
| - move occurs because `x` has type `std::option::Option<std::string::String>`, which does not implement the `Copy` trait

src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// where one side is by-ref and the other is by-move.
44

55
#![feature(bindings_after_at)]
6-
//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash
76

87
struct X { x: () }
98

src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr

+6-14
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash
2-
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:5:12
3-
|
4-
LL | #![feature(bindings_after_at)]
5-
| ^^^^^^^^^^^^^^^^^
6-
|
7-
= note: `#[warn(incomplete_features)]` on by default
8-
91
error[E0009]: cannot bind by-move and by-ref in the same pattern
10-
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:13:23
2+
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:12:23
113
|
124
LL | Some(ref _y @ _z) => { },
135
| ---------^^
@@ -16,13 +8,13 @@ LL | Some(ref _y @ _z) => { },
168
| by-ref pattern here
179

1810
error[E0007]: cannot bind by-move with sub-bindings
19-
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:19:14
11+
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:18:14
2012
|
2113
LL | Some(_z @ ref _y) => { },
2214
| ^^^^^^^^^^^ binds an already bound by-move value by moving it
2315

2416
error[E0009]: cannot bind by-move and by-ref in the same pattern
25-
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:26:27
17+
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:25:27
2618
|
2719
LL | Some(ref mut _y @ _z) => { },
2820
| -------------^^
@@ -31,13 +23,13 @@ LL | Some(ref mut _y @ _z) => { },
3123
| by-ref pattern here
3224

3325
error[E0007]: cannot bind by-move with sub-bindings
34-
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:32:14
26+
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:31:14
3527
|
3628
LL | Some(_z @ ref mut _y) => { },
3729
| ^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
3830

3931
error[E0382]: borrow of moved value
40-
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:19:19
32+
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:18:19
4133
|
4234
LL | Some(_z @ ref _y) => { },
4335
| -----^^^^^^
@@ -48,7 +40,7 @@ LL | Some(_z @ ref _y) => { },
4840
= note: move occurs because value has type `X`, which does not implement the `Copy` trait
4941

5042
error[E0382]: borrow of moved value
51-
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:32:19
43+
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:31:19
5244
|
5345
LL | Some(_z @ ref mut _y) => { },
5446
| -----^^^^^^^^^^

src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// See issue #12534.
22

33
#![feature(bindings_after_at)]
4-
//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash
54

65
fn main() {}
76

src/test/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash
2-
--> $DIR/bind-by-move-no-subbindings-fun-param.rs:3:12
3-
|
4-
LL | #![feature(bindings_after_at)]
5-
| ^^^^^^^^^^^^^^^^^
6-
|
7-
= note: `#[warn(incomplete_features)]` on by default
8-
91
error[E0007]: cannot bind by-move with sub-bindings
10-
--> $DIR/bind-by-move-no-subbindings-fun-param.rs:10:6
2+
--> $DIR/bind-by-move-no-subbindings-fun-param.rs:9:6
113
|
124
LL | fn f(a @ A(u): A) -> Box<u8> {
135
| ^^^^^^^^ binds an already bound by-move value by moving it
146

157
error[E0382]: use of moved value
16-
--> $DIR/bind-by-move-no-subbindings-fun-param.rs:10:12
8+
--> $DIR/bind-by-move-no-subbindings-fun-param.rs:9:12
179
|
1810
LL | fn f(a @ A(u): A) -> Box<u8> {
1911
| ------^-

src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Test that moving on both sides of an `@` pattern is not allowed.
22

33
#![feature(bindings_after_at)]
4-
//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash
54
#![feature(slice_patterns)]
65

76
fn main() {

src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr

+16-24
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,53 @@
1-
warning: the feature `bindings_after_at` is incomplete and may cause the compiler to crash
2-
--> $DIR/borrowck-move-and-move.rs:3:12
3-
|
4-
LL | #![feature(bindings_after_at)]
5-
| ^^^^^^^^^^^^^^^^^
6-
|
7-
= note: `#[warn(incomplete_features)]` on by default
8-
91
error[E0007]: cannot bind by-move with sub-bindings
10-
--> $DIR/borrowck-move-and-move.rs:13:9
2+
--> $DIR/borrowck-move-and-move.rs:12:9
113
|
124
LL | let a @ b = U;
135
| ^^^^^ binds an already bound by-move value by moving it
146

157
error[E0007]: cannot bind by-move with sub-bindings
16-
--> $DIR/borrowck-move-and-move.rs:17:9
8+
--> $DIR/borrowck-move-and-move.rs:16:9
179
|
1810
LL | let a @ (b, c) = (U, U);
1911
| ^^^^^^^^^^ binds an already bound by-move value by moving it
2012

2113
error[E0007]: cannot bind by-move with sub-bindings
22-
--> $DIR/borrowck-move-and-move.rs:21:9
14+
--> $DIR/borrowck-move-and-move.rs:20:9
2315
|
2416
LL | let a @ (b, c) = (u(), u());
2517
| ^^^^^^^^^^ binds an already bound by-move value by moving it
2618

2719
error[E0007]: cannot bind by-move with sub-bindings
28-
--> $DIR/borrowck-move-and-move.rs:26:9
20+
--> $DIR/borrowck-move-and-move.rs:25:9
2921
|
3022
LL | a @ Ok(b) | a @ Err(b) => {}
3123
| ^^^^^^^^^ binds an already bound by-move value by moving it
3224

3325
error[E0007]: cannot bind by-move with sub-bindings
34-
--> $DIR/borrowck-move-and-move.rs:26:21
26+
--> $DIR/borrowck-move-and-move.rs:25:21
3527
|
3628
LL | a @ Ok(b) | a @ Err(b) => {}
3729
| ^^^^^^^^^^ binds an already bound by-move value by moving it
3830

3931
error[E0007]: cannot bind by-move with sub-bindings
40-
--> $DIR/borrowck-move-and-move.rs:38:9
32+
--> $DIR/borrowck-move-and-move.rs:37:9
4133
|
4234
LL | xs @ [a, .., b] => {}
4335
| ^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
4436

4537
error[E0007]: cannot bind by-move with sub-bindings
46-
--> $DIR/borrowck-move-and-move.rs:44:9
38+
--> $DIR/borrowck-move-and-move.rs:43:9
4739
|
4840
LL | xs @ [_, ys @ .., _] => {}
4941
| ^^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
5042

5143
error[E0007]: cannot bind by-move with sub-bindings
52-
--> $DIR/borrowck-move-and-move.rs:33:12
44+
--> $DIR/borrowck-move-and-move.rs:32:12
5345
|
5446
LL | fn fun(a @ b: U) {}
5547
| ^^^^^ binds an already bound by-move value by moving it
5648

5749
error[E0382]: use of moved value
58-
--> $DIR/borrowck-move-and-move.rs:13:13
50+
--> $DIR/borrowck-move-and-move.rs:12:13
5951
|
6052
LL | let a @ b = U;
6153
| ----^ - move occurs because value has type `main::U`, which does not implement the `Copy` trait
@@ -64,7 +56,7 @@ LL | let a @ b = U;
6456
| value moved here
6557

6658
error[E0382]: use of moved value
67-
--> $DIR/borrowck-move-and-move.rs:17:17
59+
--> $DIR/borrowck-move-and-move.rs:16:17
6860
|
6961
LL | let a @ (b, c) = (U, U);
7062
| --------^- ------ 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);
7365
| value moved here
7466

7567
error[E0382]: use of moved value
76-
--> $DIR/borrowck-move-and-move.rs:21:17
68+
--> $DIR/borrowck-move-and-move.rs:20:17
7769
|
7870
LL | let a @ (b, c) = (u(), u());
7971
| --------^- ---------- 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());
8274
| value moved here
8375

8476
error[E0382]: use of moved value
85-
--> $DIR/borrowck-move-and-move.rs:26:16
77+
--> $DIR/borrowck-move-and-move.rs:25:16
8678
|
8779
LL | match Ok(U) {
8880
| ----- 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) => {}
9385
| value moved here
9486

9587
error[E0382]: use of moved value
96-
--> $DIR/borrowck-move-and-move.rs:26:29
88+
--> $DIR/borrowck-move-and-move.rs:25:29
9789
|
9890
LL | match Ok(U) {
9991
| ----- 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) => {}
10496
| value moved here
10597

10698
error[E0382]: use of moved value
107-
--> $DIR/borrowck-move-and-move.rs:38:22
99+
--> $DIR/borrowck-move-and-move.rs:37:22
108100
|
109101
LL | match [u(), u(), u(), u()] {
110102
| -------------------- move occurs because value has type `[main::U; 4]`, which does not implement the `Copy` trait
@@ -115,7 +107,7 @@ LL | xs @ [a, .., b] => {}
115107
| value moved here
116108

117109
error[E0382]: use of moved value
118-
--> $DIR/borrowck-move-and-move.rs:44:18
110+
--> $DIR/borrowck-move-and-move.rs:43:18
119111
|
120112
LL | match [u(), u(), u(), u()] {
121113
| -------------------- move occurs because value has type `[main::U; 4]`, which does not implement the `Copy` trait
@@ -126,7 +118,7 @@ LL | xs @ [_, ys @ .., _] => {}
126118
| value moved here
127119

128120
error[E0382]: use of moved value
129-
--> $DIR/borrowck-move-and-move.rs:33:16
121+
--> $DIR/borrowck-move-and-move.rs:32:16
130122
|
131123
LL | fn fun(a @ b: U) {}
132124
| ----^

src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Test `@` patterns combined with `box` patterns.
44

55
#![feature(bindings_after_at)]
6-
//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash
76
#![feature(box_patterns)]
87
#![feature(slice_patterns)]
98

src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.stderr

-8
This file was deleted.

src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Test `@` patterns combined with `box` patterns.
22

33
#![feature(bindings_after_at)]
4-
//~^ WARN the feature `bindings_after_at` is incomplete and may cause the compiler to crash
54
#![feature(box_patterns)]
65
#![feature(slice_patterns)]
76

0 commit comments

Comments
 (0)