Skip to content

Commit b292d80

Browse files
committed
Make feature negative_bounds internal
1 parent 88d69b7 commit b292d80

File tree

7 files changed

+14
-46
lines changed

7 files changed

+14
-46
lines changed

compiler/rustc_feature/src/unstable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ declare_features! (
210210
/// Allows the `multiple_supertrait_upcastable` lint.
211211
(unstable, multiple_supertrait_upcastable, "1.69.0", None),
212212
/// Allow negative trait bounds. This is an internal-only feature for testing the trait solver!
213-
(incomplete, negative_bounds, "1.71.0", None),
213+
(internal, negative_bounds, "1.71.0", None),
214214
/// Allows using `#[omit_gdb_pretty_printer_section]`.
215215
(internal, omit_gdb_pretty_printer_section, "1.5.0", None),
216216
/// Allows using `#[prelude_import]` on glob `use` items.

tests/ui/traits/negative-bounds/associated-constraints.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(negative_bounds, associated_type_bounds)]
2-
//~^ WARN the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
32

43
trait Trait {
54
type Assoc;
Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,23 @@
11
error: associated type constraints not allowed on negative bounds
2-
--> $DIR/associated-constraints.rs:8:19
2+
--> $DIR/associated-constraints.rs:7:19
33
|
44
LL | fn test<T: !Trait<Assoc = i32>>() {}
55
| ^^^^^^^^^^^
66

77
error: associated type constraints not allowed on negative bounds
8-
--> $DIR/associated-constraints.rs:11:31
8+
--> $DIR/associated-constraints.rs:10:31
99
|
1010
LL | fn test2<T>() where T: !Trait<Assoc = i32> {}
1111
| ^^^^^^^^^^^
1212

1313
error: associated type constraints not allowed on negative bounds
14-
--> $DIR/associated-constraints.rs:14:20
14+
--> $DIR/associated-constraints.rs:13:20
1515
|
1616
LL | fn test3<T: !Trait<Assoc: Send>>() {}
1717
| ^^^^^^^^^^^
1818

1919
error: associated type constraints not allowed on negative bounds
20-
--> $DIR/associated-constraints.rs:17:31
20+
--> $DIR/associated-constraints.rs:16:31
2121
|
2222
LL | fn test4<T>() where T: !Trait<Assoc: Send> {}
2323
| ^^^^^^^^^^^
24-
25-
warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
26-
--> $DIR/associated-constraints.rs:1:12
27-
|
28-
LL | #![feature(negative_bounds, associated_type_bounds)]
29-
| ^^^^^^^^^^^^^^^
30-
|
31-
= note: `#[warn(incomplete_features)]` on by default
32-
33-
error: aborting due to 4 previous errors; 1 warning emitted
34-

tests/ui/traits/negative-bounds/simple.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(negative_bounds, negative_impls)]
2-
//~^ WARN the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
32

43
fn not_copy<T: !Copy>() {}
54

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,36 @@
1-
warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/simple.rs:1:12
3-
|
4-
LL | #![feature(negative_bounds, negative_impls)]
5-
| ^^^^^^^^^^^^^^^
6-
|
7-
= note: `#[warn(incomplete_features)]` on by default
8-
91
error[E0277]: the trait bound `T: !Copy` is not satisfied
10-
--> $DIR/simple.rs:11:16
2+
--> $DIR/simple.rs:10:16
113
|
124
LL | not_copy::<T>();
135
| ^ the trait `!Copy` is not implemented for `T`
146
|
157
note: required by a bound in `not_copy`
16-
--> $DIR/simple.rs:4:16
8+
--> $DIR/simple.rs:3:16
179
|
1810
LL | fn not_copy<T: !Copy>() {}
1911
| ^^^^^ required by this bound in `not_copy`
2012

2113
error[E0277]: the trait bound `T: !Copy` is not satisfied
22-
--> $DIR/simple.rs:16:16
14+
--> $DIR/simple.rs:15:16
2315
|
2416
LL | not_copy::<T>();
2517
| ^ the trait `!Copy` is not implemented for `T`
2618
|
2719
note: required by a bound in `not_copy`
28-
--> $DIR/simple.rs:4:16
20+
--> $DIR/simple.rs:3:16
2921
|
3022
LL | fn not_copy<T: !Copy>() {}
3123
| ^^^^^ required by this bound in `not_copy`
3224

3325
error[E0277]: the trait bound `Copyable: !Copy` is not satisfied
34-
--> $DIR/simple.rs:31:16
26+
--> $DIR/simple.rs:30:16
3527
|
3628
LL | not_copy::<Copyable>();
3729
| ^^^^^^^^ the trait `!Copy` is not implemented for `Copyable`
3830
|
3931
= help: the trait `Copy` is implemented for `Copyable`
4032
note: required by a bound in `not_copy`
41-
--> $DIR/simple.rs:4:16
33+
--> $DIR/simple.rs:3:16
4234
|
4335
LL | fn not_copy<T: !Copy>() {}
4436
| ^^^^^ required by this bound in `not_copy`
@@ -49,13 +41,13 @@ LL | struct Copyable;
4941
|
5042

5143
error[E0277]: the trait bound `NotNecessarilyCopyable: !Copy` is not satisfied
52-
--> $DIR/simple.rs:38:16
44+
--> $DIR/simple.rs:37:16
5345
|
5446
LL | not_copy::<NotNecessarilyCopyable>();
5547
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `!Copy` is not implemented for `NotNecessarilyCopyable`
5648
|
5749
note: required by a bound in `not_copy`
58-
--> $DIR/simple.rs:4:16
50+
--> $DIR/simple.rs:3:16
5951
|
6052
LL | fn not_copy<T: !Copy>() {}
6153
| ^^^^^ required by this bound in `not_copy`
@@ -65,6 +57,6 @@ LL + #[derive(Copy)]
6557
LL | struct NotNecessarilyCopyable;
6658
|
6759

68-
error: aborting due to 4 previous errors; 1 warning emitted
60+
error: aborting due to 4 previous errors
6961

7062
For more information about this error, try `rustc --explain E0277`.

tests/ui/traits/negative-bounds/supertrait.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// check-pass
22

33
#![feature(negative_bounds)]
4-
//~^ WARN the feature `negative_bounds` is incomplete
54

65
trait A: !B {}
76
trait B: !A {}

tests/ui/traits/negative-bounds/supertrait.stderr

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)