Skip to content

Commit a9c203d

Browse files
committed
Mark the feature as incomplete
1 parent f8c08a3 commit a9c203d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

compiler/rustc_feature/src/active.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ declare_features! (
478478
/// Allows using `#[optimize(X)]`.
479479
(active, optimize_attribute, "1.34.0", Some(54882), None),
480480
/// Allows using pattern types.
481-
(active, pattern_types, "CURRENT_RUSTC_VERSION", Some(54882), None),
481+
(incomplete, pattern_types, "CURRENT_RUSTC_VERSION", Some(54882), None),
482482
/// Allows `extern "platform-intrinsic" { ... }`.
483483
(active, platform_intrinsics, "1.4.0", Some(27731), None),
484484
/// Allows using `#![plugin(myplugin)]`.

tests/ui/type/pattern_types/bad_pat.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(pattern_types)]
2+
#![allow(incomplete_features)]
23

34
type NonNullU32_2 = u32 is 1..=;
45
//~^ ERROR: inclusive range with no end

tests/ui/type/pattern_types/bad_pat.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
error[E0586]: inclusive range with no end
2-
--> $DIR/bad_pat.rs:3:29
2+
--> $DIR/bad_pat.rs:4:29
33
|
44
LL | type NonNullU32_2 = u32 is 1..=;
55
| ^^^ help: use `..` instead
66
|
77
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
88

99
error[E0586]: inclusive range with no end
10-
--> $DIR/bad_pat.rs:5:26
10+
--> $DIR/bad_pat.rs:6:26
1111
|
1212
LL | type Positive2 = i32 is 0..=;
1313
| ^^^ help: use `..` instead
1414
|
1515
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
1616

1717
error: "wildcard patterns are not permitted for pattern types"
18-
--> $DIR/bad_pat.rs:7:19
18+
--> $DIR/bad_pat.rs:8:19
1919
|
2020
LL | type Wild = () is _;
2121
| ^

0 commit comments

Comments
 (0)