about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-10-21 19:37:48 +0000
committerMichael Goulet <michael@errs.io>2024-10-24 09:46:36 +0000
commit779b3943d32816ce1d77672be78eb2871071322c (patch)
treeb25899e95d78a8c16f47afb721612a629d9ff5bb
parentcde29b9ec9c49dfdebe06f7e97df4a322f27bd6a (diff)
downloadrust-779b3943d32816ce1d77672be78eb2871071322c.tar.gz
rust-779b3943d32816ce1d77672be78eb2871071322c.zip
Add next-solver to more effects tests
-rw-r--r--tests/ui/consts/const-try.rs4
-rw-r--r--tests/ui/consts/const-try.stderr9
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs1
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.stderr16
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs2
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr24
-rw-r--r--tests/ui/traits/const-traits/assoc-type.rs5
-rw-r--r--tests/ui/traits/const-traits/assoc-type.stderr16
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-chain.rs1
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-chain.stderr19
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-dup-bound.rs1
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr19
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-pass.rs1
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-pass.stderr15
-rw-r--r--tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs2
-rw-r--r--tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr15
-rw-r--r--tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs2
-rw-r--r--tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr11
-rw-r--r--tests/ui/traits/const-traits/const-impl-requires-const-trait.rs7
-rw-r--r--tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr20
-rw-r--r--tests/ui/traits/const-traits/const-impl-trait.rs3
-rw-r--r--tests/ui/traits/const-traits/hir-const-check.rs2
-rw-r--r--tests/ui/traits/const-traits/hir-const-check.stderr11
23 files changed, 102 insertions, 104 deletions
diff --git a/tests/ui/consts/const-try.rs b/tests/ui/consts/const-try.rs
index 9089dd70a26..2862b6ffb17 100644
--- a/tests/ui/consts/const-try.rs
+++ b/tests/ui/consts/const-try.rs
@@ -1,4 +1,4 @@
-//@ known-bug: #110395
+//@ compile-flags: -Znext-solver
 
 // Demonstrates what's needed to make use of `?` in const contexts.
 
@@ -14,12 +14,14 @@ struct TryMe;
 struct Error;
 
 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 {
         TryMe
     }
 }
 
 impl const Try for TryMe {
+    //~^ ERROR const `impl` for trait `Try` which is not marked with `#[const_trait]`
     type Output = ();
     type Residual = Error;
     fn from_output(output: Self::Output) -> Self {
diff --git a/tests/ui/consts/const-try.stderr b/tests/ui/consts/const-try.stderr
index 8afdd4e0d61..ba9da242107 100644
--- a/tests/ui/consts/const-try.stderr
+++ b/tests/ui/consts/const-try.stderr
@@ -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]`
   --> $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
 
 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 {
    |            ^^^
@@ -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: 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
 
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs
index 4399ae2d1be..5a54e8eec91 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: -Znext-solver
 //@ known-bug: unknown
 
 #![allow(incomplete_features)]
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.stderr
index 20448f51de2..35069a5a52f 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.stderr
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.stderr
@@ -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
-   = help: use `-Znext-solver` to enable
+LL |     T::Assoc::func()
+   |     ^^^^^^^^^^^^^^^^ 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`.
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs
index 8a1bf75f87e..04ad94556c3 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs
@@ -1,5 +1,5 @@
+//@ compile-flags: -Znext-solver
 //@ known-bug: unknown
-// FIXME(effects)
 
 #![feature(const_trait_impl, effects, generic_const_exprs)]
 #![allow(incomplete_features)]
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr
index 20448f51de2..ed9182c7334 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr
@@ -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
-   = help: use `-Znext-solver` to enable
+LL | #![feature(const_trait_impl, effects, generic_const_exprs)]
+   |                                       ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: remove one of these features
+
+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 1 previous error
+error: aborting due to 3 previous errors
 
+For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/const-traits/assoc-type.rs b/tests/ui/traits/const-traits/assoc-type.rs
index ea3cbabf302..a9394d90ed8 100644
--- a/tests/ui/traits/const-traits/assoc-type.rs
+++ b/tests/ui/traits/const-traits/assoc-type.rs
@@ -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
 
 #[const_trait]
@@ -33,7 +34,7 @@ trait Foo {
 
 impl const Foo for 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]
diff --git a/tests/ui/traits/const-traits/assoc-type.stderr b/tests/ui/traits/const-traits/assoc-type.stderr
index c20b53c210f..5c77754200a 100644
--- a/tests/ui/traits/const-traits/assoc-type.stderr
+++ b/tests/ui/traits/const-traits/assoc-type.stderr
@@ -1,5 +1,5 @@
 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)]
    |                              ^^^^^^^
@@ -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: `#[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
-   = help: use `-Znext-solver` to enable
+LL |     type Bar = NonConstAdd;
+   |                ^^^^^^^^^^^
+   |
+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
 
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/call-generic-method-chain.rs b/tests/ui/traits/const-traits/call-generic-method-chain.rs
index 9df694a02f5..e5baedae818 100644
--- a/tests/ui/traits/const-traits/call-generic-method-chain.rs
+++ b/tests/ui/traits/const-traits/call-generic-method-chain.rs
@@ -1,6 +1,7 @@
 //! Basic test for calling methods on generic type parameters in `const fn`.
 
 //@ known-bug: #110395
+//@ compile-flags: -Znext-solver
 // FIXME(effects) check-pass
 
 #![feature(const_trait_impl, effects)]
diff --git a/tests/ui/traits/const-traits/call-generic-method-chain.stderr b/tests/ui/traits/const-traits/call-generic-method-chain.stderr
index dce9f085390..62eed0f14f9 100644
--- a/tests/ui/traits/const-traits/call-generic-method-chain.stderr
+++ b/tests/ui/traits/const-traits/call-generic-method-chain.stderr
@@ -1,5 +1,5 @@
 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)]
    |                              ^^^^^^^
@@ -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: `#[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]`
-  --> $DIR/call-generic-method-chain.rs:10:12
+  --> $DIR/call-generic-method-chain.rs:11:12
    |
 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
 
 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 {
    |                                ^^^^^^^^^
 
 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 {
    |                                ^^^^^^^^^
@@ -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`
 
 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 {
    |                                        ^^^^^^^^^
 
 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 {
    |                                        ^^^^^^^^^
    |
    = 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
 
diff --git a/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs
index f46a34911f1..83a4bb25436 100644
--- a/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs
+++ b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: -Znext-solver
 //@ known-bug: #110395
 // FIXME(effects) check-pass
 
diff --git a/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr b/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr
index 5da511a580e..3f9dce919d0 100644
--- a/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr
+++ b/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr
@@ -1,5 +1,5 @@
 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)]
    |                              ^^^^^^^
@@ -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: `#[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]`
-  --> $DIR/call-generic-method-dup-bound.rs:8:12
+  --> $DIR/call-generic-method-dup-bound.rs:9:12
    |
 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
 
 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 {
    |                                            ^^^^^^^^^
 
 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 {
    |                                            ^^^^^^^^^
@@ -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`
 
 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 {
    |                                     ^^^^^^^^^
 
 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 {
    |                                     ^^^^^^^^^
    |
    = 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
 
diff --git a/tests/ui/traits/const-traits/call-generic-method-pass.rs b/tests/ui/traits/const-traits/call-generic-method-pass.rs
index 413685d8b34..cbeeb2567dd 100644
--- a/tests/ui/traits/const-traits/call-generic-method-pass.rs
+++ b/tests/ui/traits/const-traits/call-generic-method-pass.rs
@@ -1,5 +1,6 @@
 //! Basic test for calling methods on generic type parameters in `const fn`.
 
+//@ compile-flags: -Znext-solver
 //@ known-bug: #110395
 // FIXME(effects) check-pass
 
diff --git a/tests/ui/traits/const-traits/call-generic-method-pass.stderr b/tests/ui/traits/const-traits/call-generic-method-pass.stderr
index 52579813b69..e35de48ed60 100644
--- a/tests/ui/traits/const-traits/call-generic-method-pass.stderr
+++ b/tests/ui/traits/const-traits/call-generic-method-pass.stderr
@@ -1,5 +1,5 @@
 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)]
    |                              ^^^^^^^
@@ -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: `#[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]`
-  --> $DIR/call-generic-method-pass.rs:10:12
+  --> $DIR/call-generic-method-pass.rs:11:12
    |
 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
 
 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 {
    |                                ^^^^^^^^^
 
 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 {
    |                                ^^^^^^^^^
    |
    = 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
 
diff --git a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs
index 099cf0b00d3..7c3e2af1797 100644
--- a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs
+++ b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs
@@ -1,3 +1,5 @@
+//@ compile-flags: -Znext-solver
+
 #![allow(incomplete_features)]
 #![feature(const_trait_impl, effects)]
 
diff --git a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr
index b5d9b1fff8a..ae1260ffab7 100644
--- a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr
+++ b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr
@@ -1,31 +1,26 @@
 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;
    |                                        ^^^^^^
    |
 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;
    |        ^^^^^^^^^^^^^^^^^
 
 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 {
    |                                ^^^^^^
    |
 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 {
    |            ^^^
 
-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: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs
index a1710e65252..7f9b38b8207 100644
--- a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs
+++ b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs
@@ -1,3 +1,5 @@
+//@ compile-flags: -Znext-solver
+
 #![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
 
 struct S;
diff --git a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr
index 49cd1725c8c..ba12854987e 100644
--- a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr
+++ b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr
@@ -1,5 +1,5 @@
 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)]
    |                              ^^^^^^^
@@ -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: `#[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
-  --> $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() }
    |                ^^^^^^^^^^^
    |
    = 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`.
diff --git a/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs b/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs
index bd6f476f879..e49e9090eb4 100644
--- a/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs
+++ b/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs
@@ -1,11 +1,10 @@
-//@ known-bug: #110395
-
+//@ compile-flags: -Znext-solver
 #![feature(const_trait_impl, effects)]
+#![allow(incomplete_features)]
 
 pub trait A {}
-// FIXME ~^ HELP: mark `A` as const
 
 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() {}
diff --git a/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr b/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr
index 2a030369093..828e2174f00 100644
--- a/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr
+++ b/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr
@@ -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]`
-  --> $DIR/const-impl-requires-const-trait.rs:8:12
+  --> $DIR/const-impl-requires-const-trait.rs:7:12
    |
 LL | pub trait A {}
    | - help: mark `A` as const: `#[const_trait]`
-...
+LL |
 LL | impl const A for () {}
    |            ^
    |
    = 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
 
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/const-traits/const-impl-trait.rs b/tests/ui/traits/const-traits/const-impl-trait.rs
index 51dfe29b829..61b8c9a5bff 100644
--- a/tests/ui/traits/const-traits/const-impl-trait.rs
+++ b/tests/ui/traits/const-traits/const-impl-trait.rs
@@ -1,4 +1,7 @@
+//@ compile-flags: -Znext-solver
 //@ known-bug: #110395
+//@ failure-status: 101
+//@ dont-check-compiler-stderr
 // Broken until we have `&T: const Deref` impl in stdlib
 
 #![allow(incomplete_features)]
diff --git a/tests/ui/traits/const-traits/hir-const-check.rs b/tests/ui/traits/const-traits/hir-const-check.rs
index f5fb0fd516a..b3df6495afc 100644
--- a/tests/ui/traits/const-traits/hir-const-check.rs
+++ b/tests/ui/traits/const-traits/hir-const-check.rs
@@ -1,3 +1,5 @@
+//@ compile-flags: -Znext-solver
+
 // Regression test for #69615.
 
 #![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
diff --git a/tests/ui/traits/const-traits/hir-const-check.stderr b/tests/ui/traits/const-traits/hir-const-check.stderr
index 598129d8694..19ea734efb7 100644
--- a/tests/ui/traits/const-traits/hir-const-check.stderr
+++ b/tests/ui/traits/const-traits/hir-const-check.stderr
@@ -1,5 +1,5 @@
 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)]
    |                              ^^^^^^^
@@ -8,7 +8,7 @@ LL | #![feature(const_trait_impl, effects)]
    = note: `#[warn(incomplete_features)]` on by default
 
 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(())?;
    |         ^^^^^^^^^
@@ -17,11 +17,6 @@ LL |         Some(())?;
    = 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
 
-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: 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 E0658`.