Skip to content

Commit f6f1a10

Browse files
committed
Make effects an incomplete feature
1 parent a6a83d3 commit f6f1a10

File tree

118 files changed

+758
-98
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+758
-98
lines changed

compiler/rustc_feature/src/unstable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ declare_features! (
449449
/// Allows `dyn* Trait` objects.
450450
(incomplete, dyn_star, "1.65.0", Some(102425)),
451451
/// Uses generic effect parameters for ~const bounds
452-
(unstable, effects, "1.72.0", Some(102090)),
452+
(incomplete, effects, "1.72.0", Some(102090)),
453453
/// Allows exhaustive pattern matching on types that contain uninhabited types.
454454
(unstable, exhaustive_patterns, "1.13.0", Some(51085)),
455455
/// Allows explicit tail calls via `become` expression.

tests/ui/const-generics/const_trait_fn-issue-88433.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ build-pass
22

3-
#![feature(const_trait_impl, effects)]
3+
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
44

55
#[const_trait]
66
trait Func<T> {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/const_trait_fn-issue-88433.rs:3:30
3+
|
4+
LL | #![feature(const_trait_impl, effects)]
5+
| ^^^^^^^
6+
|
7+
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
8+
= note: `#[warn(incomplete_features)]` on by default
9+
10+
warning: 1 warning emitted
11+

tests/ui/consts/auxiliary/closure-in-foreign-crate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![crate_type = "lib"]
2-
#![feature(const_closures, const_trait_impl, effects)]
2+
#![feature(const_closures, const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
33

44
pub const fn test() {
55
let cl = const || {};

tests/ui/consts/const-float-classify.stderr

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/const-float-classify.rs:7:30
3+
|
4+
LL | #![feature(const_trait_impl, effects)]
5+
| ^^^^^^^
6+
|
7+
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
8+
= note: `#[warn(incomplete_features)]` on by default
9+
110
error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
211
--> $DIR/const-float-classify.rs:12:12
312
|
@@ -208,7 +217,7 @@ LL | impl const PartialEq<NonDet> for bool {
208217
| unsatisfied trait bound introduced here
209218
= note: this error originates in the macro `const_assert` which comes from the expansion of the macro `suite` (in Nightly builds, run with -Z macro-backtrace for more info)
210219

211-
error: aborting due to 10 previous errors
220+
error: aborting due to 10 previous errors; 1 warning emitted
212221

213222
Some errors have detailed explanations: E0207, E0284.
214223
For more information about an error, try `rustc --explain E0207`.

tests/ui/consts/const_cmp_type_id.stderr

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/const_cmp_type_id.rs:3:30
3+
|
4+
LL | #![feature(const_trait_impl, effects)]
5+
| ^^^^^^^
6+
|
7+
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
8+
= note: `#[warn(incomplete_features)]` on by default
9+
110
error[E0131]: `main` function is not allowed to have generic parameters
211
--> $DIR/const_cmp_type_id.rs:7:14
312
|
@@ -10,7 +19,7 @@ error[E0080]: evaluation of constant value failed
1019
LL | const _A: bool = TypeId::of::<u8>() < TypeId::of::<u16>();
1120
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `<TypeId as PartialOrd>::lt`
1221

13-
error: aborting due to 2 previous errors
22+
error: aborting due to 2 previous errors; 1 warning emitted
1423

1524
Some errors have detailed explanations: E0080, E0131.
1625
For more information about an error, try `rustc --explain E0080`.

tests/ui/consts/rustc-impl-const-stability.stderr

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/rustc-impl-const-stability.rs:5:30
3+
|
4+
LL | #![feature(const_trait_impl, effects)]
5+
| ^^^^^^^
6+
|
7+
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
8+
= note: `#[warn(incomplete_features)]` on by default
9+
110
error: const `impl` for trait `Default` which is not marked with `#[const_trait]`
211
--> $DIR/rustc-impl-const-stability.rs:15:12
312
|
@@ -16,6 +25,6 @@ LL | impl const Default for Data {
1625
= note: expressions using a const parameter must map each value to a distinct output value
1726
= note: proving the result of expressions other than the parameter are unique is not supported
1827

19-
error: aborting due to 2 previous errors
28+
error: aborting due to 2 previous errors; 1 warning emitted
2029

2130
For more information about this error, try `rustc --explain E0207`.

tests/ui/parser/impls-nested-within-fns-semantic-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Regression test for part of issue #119924.
22
//@ check-pass
33

4-
#![feature(const_trait_impl, effects)]
4+
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
55

66
#[const_trait]
77
trait Trait {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/impls-nested-within-fns-semantic-1.rs:4:30
3+
|
4+
LL | #![feature(const_trait_impl, effects)]
5+
| ^^^^^^^
6+
|
7+
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
8+
= note: `#[warn(incomplete_features)]` on by default
9+
10+
warning: 1 warning emitted
11+

tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.qualified.stderr

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/assoc-type-const-bound-usage-0.rs:6:30
3+
|
4+
LL | #![feature(const_trait_impl, effects)]
5+
| ^^^^^^^
6+
|
7+
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
8+
= note: `#[warn(incomplete_features)]` on by default
9+
110
error[E0277]: the trait bound `T: Trait` is not satisfied
211
--> $DIR/assoc-type-const-bound-usage-0.rs:21:6
312
|
@@ -9,6 +18,6 @@ help: consider further restricting this bound
918
LL | const fn qualified<T: ~const Trait + Trait>() -> i32 {
1019
| +++++++
1120

12-
error: aborting due to 1 previous error
21+
error: aborting due to 1 previous error; 1 warning emitted
1322

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

0 commit comments

Comments
 (0)