Add next-solver to more effects tests

This commit is contained in:
Michael Goulet 2024-10-21 19:37:48 +00:00
parent cde29b9ec9
commit 779b3943d3
23 changed files with 102 additions and 104 deletions

View File

@ -1,4 +1,4 @@
//@ known-bug: #110395 //@ compile-flags: -Znext-solver
// Demonstrates what's needed to make use of `?` in const contexts. // Demonstrates what's needed to make use of `?` in const contexts.
@ -14,12 +14,14 @@
struct Error; struct Error;
impl const FromResidual<Error> for TryMe { impl const FromResidual<Error> for TryMe {
//~^ ERROR const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
fn from_residual(residual: Error) -> Self { fn from_residual(residual: Error) -> Self {
TryMe TryMe
} }
} }
impl const Try for TryMe { impl const Try for TryMe {
//~^ ERROR const `impl` for trait `Try` which is not marked with `#[const_trait]`
type Output = (); type Output = ();
type Residual = Error; type Residual = Error;
fn from_output(output: Self::Output) -> Self { fn from_output(output: Self::Output) -> Self {

View File

@ -1,8 +1,3 @@
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]` error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
--> $DIR/const-try.rs:16:12 --> $DIR/const-try.rs:16:12
| |
@ -13,7 +8,7 @@ LL | impl const FromResidual<Error> for TryMe {
= note: adding a non-const method body in the future would be a breaking change = note: adding a non-const method body in the future would be a breaking change
error: const `impl` for trait `Try` which is not marked with `#[const_trait]` error: const `impl` for trait `Try` which is not marked with `#[const_trait]`
--> $DIR/const-try.rs:22:12 --> $DIR/const-try.rs:23:12
| |
LL | impl const Try for TryMe { LL | impl const Try for TryMe {
| ^^^ | ^^^
@ -21,5 +16,5 @@ LL | impl const Try for TryMe {
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
= note: adding a non-const method body in the future would be a breaking change = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 3 previous errors error: aborting due to 2 previous errors

View File

@ -1,3 +1,4 @@
//@ compile-flags: -Znext-solver
//@ known-bug: unknown //@ known-bug: unknown
#![allow(incomplete_features)] #![allow(incomplete_features)]

View File

@ -1,7 +1,15 @@
error: using `#![feature(effects)]` without enabling next trait solver globally error[E0271]: type mismatch resolving `<T as Trait>::Assoc == T`
--> $DIR/assoc-type-const-bound-usage-0.rs:14:5
| |
= note: the next trait solver must be enabled globally for the effects feature to work correctly LL | T::Assoc::func()
= help: use `-Znext-solver` to enable | ^^^^^^^^^^^^^^^^ types differ
error: aborting due to 1 previous error error[E0271]: type mismatch resolving `<T as Trait>::Assoc == T`
--> $DIR/assoc-type-const-bound-usage-0.rs:18:5
|
LL | <T as Trait>::Assoc::func()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0271`.

View File

@ -1,5 +1,5 @@
//@ compile-flags: -Znext-solver
//@ known-bug: unknown //@ known-bug: unknown
// FIXME(effects)
#![feature(const_trait_impl, effects, generic_const_exprs)] #![feature(const_trait_impl, effects, generic_const_exprs)]
#![allow(incomplete_features)] #![allow(incomplete_features)]

View File

@ -1,7 +1,23 @@
error: using `#![feature(effects)]` without enabling next trait solver globally error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed
--> $DIR/assoc-type-const-bound-usage-1.rs:4:39
| |
= note: the next trait solver must be enabled globally for the effects feature to work correctly LL | #![feature(const_trait_impl, effects, generic_const_exprs)]
= help: use `-Znext-solver` to enable | ^^^^^^^^^^^^^^^^^^^
|
= help: remove one of these features
error: aborting due to 1 previous error error[E0271]: type mismatch resolving `<T as Trait>::Assoc == T`
--> $DIR/assoc-type-const-bound-usage-1.rs:15:44
|
LL | fn unqualified<T: const Trait>() -> Type<{ T::Assoc::func() }> {
| ^^^^^^^^^^^^^^^^ types differ
error[E0271]: type mismatch resolving `<T as Trait>::Assoc == T`
--> $DIR/assoc-type-const-bound-usage-1.rs:19:42
|
LL | fn qualified<T: const Trait>() -> Type<{ <T as Trait>::Assoc::func() }> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0271`.

View File

@ -1,4 +1,5 @@
// FIXME(effects): Replace `Add` with `std::ops::Add` once the latter a `#[const_trait]` again. //@ compile-flags: -Znext-solver
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete #![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
#[const_trait] #[const_trait]
@ -33,7 +34,7 @@ trait Foo {
impl const Foo for NonConstAdd { impl const Foo for NonConstAdd {
type Bar = NonConstAdd; type Bar = NonConstAdd;
// FIXME(effects) ERROR the trait bound `NonConstAdd: ~const Add` is not satisfied //~^ ERROR the trait bound `NonConstAdd: ~const Add` is not satisfied
} }
#[const_trait] #[const_trait]

View File

@ -1,5 +1,5 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/assoc-type.rs:2:30 --> $DIR/assoc-type.rs:3:30
| |
LL | #![feature(const_trait_impl, effects)] LL | #![feature(const_trait_impl, effects)]
| ^^^^^^^ | ^^^^^^^
@ -7,10 +7,18 @@ LL | #![feature(const_trait_impl, effects)]
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
= note: `#[warn(incomplete_features)]` on by default = note: `#[warn(incomplete_features)]` on by default
error: using `#![feature(effects)]` without enabling next trait solver globally error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied
--> $DIR/assoc-type.rs:36:16
| |
= note: the next trait solver must be enabled globally for the effects feature to work correctly LL | type Bar = NonConstAdd;
= help: use `-Znext-solver` to enable | ^^^^^^^^^^^
|
note: required by a bound in `Foo::Bar`
--> $DIR/assoc-type.rs:32:15
|
LL | type Bar: ~const Add;
| ^^^^^^^^^^ required by this bound in `Foo::Bar`
error: aborting due to 1 previous error; 1 warning emitted error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.

View File

@ -1,6 +1,7 @@
//! Basic test for calling methods on generic type parameters in `const fn`. //! Basic test for calling methods on generic type parameters in `const fn`.
//@ known-bug: #110395 //@ known-bug: #110395
//@ compile-flags: -Znext-solver
// FIXME(effects) check-pass // FIXME(effects) check-pass
#![feature(const_trait_impl, effects)] #![feature(const_trait_impl, effects)]

View File

@ -1,5 +1,5 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/call-generic-method-chain.rs:6:30 --> $DIR/call-generic-method-chain.rs:7:30
| |
LL | #![feature(const_trait_impl, effects)] LL | #![feature(const_trait_impl, effects)]
| ^^^^^^^ | ^^^^^^^
@ -7,13 +7,8 @@ LL | #![feature(const_trait_impl, effects)]
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
= note: `#[warn(incomplete_features)]` on by default = note: `#[warn(incomplete_features)]` on by default
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
--> $DIR/call-generic-method-chain.rs:10:12 --> $DIR/call-generic-method-chain.rs:11:12
| |
LL | impl const PartialEq for S { LL | impl const PartialEq for S {
| ^^^^^^^^^ | ^^^^^^^^^
@ -22,13 +17,13 @@ LL | impl const PartialEq for S {
= note: adding a non-const method body in the future would be a breaking change = note: adding a non-const method body in the future would be a breaking change
error: `~const` can only be applied to `#[const_trait]` traits error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/call-generic-method-chain.rs:19:32 --> $DIR/call-generic-method-chain.rs:20:32
| |
LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool { LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^ | ^^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/call-generic-method-chain.rs:19:32 --> $DIR/call-generic-method-chain.rs:20:32
| |
LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool { LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^ | ^^^^^^^^^
@ -36,18 +31,18 @@ LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: `~const` can only be applied to `#[const_trait]` traits error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/call-generic-method-chain.rs:23:40 --> $DIR/call-generic-method-chain.rs:24:40
| |
LL | const fn equals_self_wrapper<T: ~const PartialEq>(t: &T) -> bool { LL | const fn equals_self_wrapper<T: ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^ | ^^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/call-generic-method-chain.rs:23:40 --> $DIR/call-generic-method-chain.rs:24:40
| |
LL | const fn equals_self_wrapper<T: ~const PartialEq>(t: &T) -> bool { LL | const fn equals_self_wrapper<T: ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^ | ^^^^^^^^^
| |
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 6 previous errors; 1 warning emitted error: aborting due to 5 previous errors; 1 warning emitted

View File

@ -1,3 +1,4 @@
//@ compile-flags: -Znext-solver
//@ known-bug: #110395 //@ known-bug: #110395
// FIXME(effects) check-pass // FIXME(effects) check-pass

View File

@ -1,5 +1,5 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/call-generic-method-dup-bound.rs:4:30 --> $DIR/call-generic-method-dup-bound.rs:5:30
| |
LL | #![feature(const_trait_impl, effects)] LL | #![feature(const_trait_impl, effects)]
| ^^^^^^^ | ^^^^^^^
@ -7,13 +7,8 @@ LL | #![feature(const_trait_impl, effects)]
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
= note: `#[warn(incomplete_features)]` on by default = note: `#[warn(incomplete_features)]` on by default
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
--> $DIR/call-generic-method-dup-bound.rs:8:12 --> $DIR/call-generic-method-dup-bound.rs:9:12
| |
LL | impl const PartialEq for S { LL | impl const PartialEq for S {
| ^^^^^^^^^ | ^^^^^^^^^
@ -22,13 +17,13 @@ LL | impl const PartialEq for S {
= note: adding a non-const method body in the future would be a breaking change = note: adding a non-const method body in the future would be a breaking change
error: `~const` can only be applied to `#[const_trait]` traits error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/call-generic-method-dup-bound.rs:19:44 --> $DIR/call-generic-method-dup-bound.rs:20:44
| |
LL | const fn equals_self<T: PartialEq + ~const PartialEq>(t: &T) -> bool { LL | const fn equals_self<T: PartialEq + ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^ | ^^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/call-generic-method-dup-bound.rs:19:44 --> $DIR/call-generic-method-dup-bound.rs:20:44
| |
LL | const fn equals_self<T: PartialEq + ~const PartialEq>(t: &T) -> bool { LL | const fn equals_self<T: PartialEq + ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^ | ^^^^^^^^^
@ -36,18 +31,18 @@ LL | const fn equals_self<T: PartialEq + ~const PartialEq>(t: &T) -> bool {
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: `~const` can only be applied to `#[const_trait]` traits error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/call-generic-method-dup-bound.rs:26:37 --> $DIR/call-generic-method-dup-bound.rs:27:37
| |
LL | const fn equals_self2<T: A + ~const PartialEq>(t: &T) -> bool { LL | const fn equals_self2<T: A + ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^ | ^^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/call-generic-method-dup-bound.rs:26:37 --> $DIR/call-generic-method-dup-bound.rs:27:37
| |
LL | const fn equals_self2<T: A + ~const PartialEq>(t: &T) -> bool { LL | const fn equals_self2<T: A + ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^ | ^^^^^^^^^
| |
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 6 previous errors; 1 warning emitted error: aborting due to 5 previous errors; 1 warning emitted

View File

@ -1,5 +1,6 @@
//! Basic test for calling methods on generic type parameters in `const fn`. //! Basic test for calling methods on generic type parameters in `const fn`.
//@ compile-flags: -Znext-solver
//@ known-bug: #110395 //@ known-bug: #110395
// FIXME(effects) check-pass // FIXME(effects) check-pass

View File

@ -1,5 +1,5 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/call-generic-method-pass.rs:6:30 --> $DIR/call-generic-method-pass.rs:7:30
| |
LL | #![feature(const_trait_impl, effects)] LL | #![feature(const_trait_impl, effects)]
| ^^^^^^^ | ^^^^^^^
@ -7,13 +7,8 @@ LL | #![feature(const_trait_impl, effects)]
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
= note: `#[warn(incomplete_features)]` on by default = note: `#[warn(incomplete_features)]` on by default
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
--> $DIR/call-generic-method-pass.rs:10:12 --> $DIR/call-generic-method-pass.rs:11:12
| |
LL | impl const PartialEq for S { LL | impl const PartialEq for S {
| ^^^^^^^^^ | ^^^^^^^^^
@ -22,18 +17,18 @@ LL | impl const PartialEq for S {
= note: adding a non-const method body in the future would be a breaking change = note: adding a non-const method body in the future would be a breaking change
error: `~const` can only be applied to `#[const_trait]` traits error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/call-generic-method-pass.rs:19:32 --> $DIR/call-generic-method-pass.rs:20:32
| |
LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool { LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^ | ^^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/call-generic-method-pass.rs:19:32 --> $DIR/call-generic-method-pass.rs:20:32
| |
LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool { LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^ | ^^^^^^^^^
| |
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 4 previous errors; 1 warning emitted error: aborting due to 3 previous errors; 1 warning emitted

View File

@ -1,3 +1,5 @@
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)] #![allow(incomplete_features)]
#![feature(const_trait_impl, effects)] #![feature(const_trait_impl, effects)]

View File

@ -1,31 +1,26 @@
error: `~const` is not allowed here error: `~const` is not allowed here
--> $DIR/const-bound-on-not-const-associated-fn.rs:10:40 --> $DIR/const-bound-on-not-const-associated-fn.rs:12:40
| |
LL | fn do_something_else() where Self: ~const MyTrait; LL | fn do_something_else() where Self: ~const MyTrait;
| ^^^^^^ | ^^^^^^
| |
note: this function is not `const`, so it cannot have `~const` trait bounds note: this function is not `const`, so it cannot have `~const` trait bounds
--> $DIR/const-bound-on-not-const-associated-fn.rs:10:8 --> $DIR/const-bound-on-not-const-associated-fn.rs:12:8
| |
LL | fn do_something_else() where Self: ~const MyTrait; LL | fn do_something_else() where Self: ~const MyTrait;
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^
error: `~const` is not allowed here error: `~const` is not allowed here
--> $DIR/const-bound-on-not-const-associated-fn.rs:21:32 --> $DIR/const-bound-on-not-const-associated-fn.rs:23:32
| |
LL | pub fn foo(&self) where T: ~const MyTrait { LL | pub fn foo(&self) where T: ~const MyTrait {
| ^^^^^^ | ^^^^^^
| |
note: this function is not `const`, so it cannot have `~const` trait bounds note: this function is not `const`, so it cannot have `~const` trait bounds
--> $DIR/const-bound-on-not-const-associated-fn.rs:21:12 --> $DIR/const-bound-on-not-const-associated-fn.rs:23:12
| |
LL | pub fn foo(&self) where T: ~const MyTrait { LL | pub fn foo(&self) where T: ~const MyTrait {
| ^^^ | ^^^
error: using `#![feature(effects)]` without enabling next trait solver globally error: aborting due to 2 previous errors
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: aborting due to 3 previous errors

View File

@ -1,3 +1,5 @@
//@ compile-flags: -Znext-solver
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete #![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
struct S; struct S;

View File

@ -1,5 +1,5 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-check-fns-in-const-impl.rs:1:30 --> $DIR/const-check-fns-in-const-impl.rs:3:30
| |
LL | #![feature(const_trait_impl, effects)] LL | #![feature(const_trait_impl, effects)]
| ^^^^^^^ | ^^^^^^^
@ -7,19 +7,14 @@ LL | #![feature(const_trait_impl, effects)]
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
= note: `#[warn(incomplete_features)]` on by default = note: `#[warn(incomplete_features)]` on by default
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0015]: cannot call non-const fn `non_const` in constant functions error[E0015]: cannot call non-const fn `non_const` in constant functions
--> $DIR/const-check-fns-in-const-impl.rs:12:16 --> $DIR/const-check-fns-in-const-impl.rs:14:16
| |
LL | fn foo() { non_const() } LL | fn foo() { non_const() }
| ^^^^^^^^^^^ | ^^^^^^^^^^^
| |
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
error: aborting due to 2 previous errors; 1 warning emitted error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0015`. For more information about this error, try `rustc --explain E0015`.

View File

@ -1,11 +1,10 @@
//@ known-bug: #110395 //@ compile-flags: -Znext-solver
#![feature(const_trait_impl, effects)] #![feature(const_trait_impl, effects)]
#![allow(incomplete_features)]
pub trait A {} pub trait A {}
// FIXME ~^ HELP: mark `A` as const
impl const A for () {} impl const A for () {}
// FIXME ~^ ERROR: const `impl` for trait `A` which is not marked with `#[const_trait]` //~^ ERROR: const `impl` for trait `A` which is not marked with `#[const_trait]`
fn main() {} fn main() {}

View File

@ -1,28 +1,14 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-impl-requires-const-trait.rs:3:30
|
LL | #![feature(const_trait_impl, effects)]
| ^^^^^^^
|
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
= note: `#[warn(incomplete_features)]` on by default
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `A` which is not marked with `#[const_trait]` error: const `impl` for trait `A` which is not marked with `#[const_trait]`
--> $DIR/const-impl-requires-const-trait.rs:8:12 --> $DIR/const-impl-requires-const-trait.rs:7:12
| |
LL | pub trait A {} LL | pub trait A {}
| - help: mark `A` as const: `#[const_trait]` | - help: mark `A` as const: `#[const_trait]`
... LL |
LL | impl const A for () {} LL | impl const A for () {}
| ^ | ^
| |
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
= note: adding a non-const method body in the future would be a breaking change = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 2 previous errors; 1 warning emitted error: aborting due to 1 previous error

View File

@ -1,4 +1,7 @@
//@ compile-flags: -Znext-solver
//@ known-bug: #110395 //@ known-bug: #110395
//@ failure-status: 101
//@ dont-check-compiler-stderr
// Broken until we have `&T: const Deref` impl in stdlib // Broken until we have `&T: const Deref` impl in stdlib
#![allow(incomplete_features)] #![allow(incomplete_features)]

View File

@ -1,3 +1,5 @@
//@ compile-flags: -Znext-solver
// Regression test for #69615. // Regression test for #69615.
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete #![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete

View File

@ -1,5 +1,5 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/hir-const-check.rs:3:30 --> $DIR/hir-const-check.rs:5:30
| |
LL | #![feature(const_trait_impl, effects)] LL | #![feature(const_trait_impl, effects)]
| ^^^^^^^ | ^^^^^^^
@ -8,7 +8,7 @@ LL | #![feature(const_trait_impl, effects)]
= note: `#[warn(incomplete_features)]` on by default = note: `#[warn(incomplete_features)]` on by default
error[E0658]: `?` is not allowed in a `const fn` error[E0658]: `?` is not allowed in a `const fn`
--> $DIR/hir-const-check.rs:12:9 --> $DIR/hir-const-check.rs:14:9
| |
LL | Some(())?; LL | Some(())?;
| ^^^^^^^^^ | ^^^^^^^^^
@ -17,11 +17,6 @@ LL | Some(())?;
= help: add `#![feature(const_try)]` to the crate attributes to enable = help: add `#![feature(const_try)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error: using `#![feature(effects)]` without enabling next trait solver globally error: aborting due to 1 previous error; 1 warning emitted
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0658`. For more information about this error, try `rustc --explain E0658`.