about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr10
-rw-r--r--tests/ui/const-generics/issues/issue-88119.stderr10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.stderr10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs5
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr16
5 files changed, 41 insertions, 10 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr
index db93bcca60f..bae8249845c 100644
--- a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr
@@ -1,3 +1,11 @@
+error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed
+  --> $DIR/unify-op-with-fn-call.rs:3:12
+   |
+LL | #![feature(generic_const_exprs, adt_const_params, const_trait_impl, effects)]
+   |            ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: remove one of these features
+
 error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
   --> $DIR/unify-op-with-fn-call.rs:10:12
    |
@@ -67,7 +75,7 @@ error[E0284]: type annotations needed: cannot normalize `foo2<N>::{constant#0}`
 LL |     bar2::<{ std::ops::Add::add(N, N) }>();
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot normalize `foo2<N>::{constant#0}`
 
-error: aborting due to 8 previous errors
+error: aborting due to 9 previous errors
 
 Some errors have detailed explanations: E0284, E0741.
 For more information about an error, try `rustc --explain E0284`.
diff --git a/tests/ui/const-generics/issues/issue-88119.stderr b/tests/ui/const-generics/issues/issue-88119.stderr
index b5eec3046fd..98bb8196810 100644
--- a/tests/ui/const-generics/issues/issue-88119.stderr
+++ b/tests/ui/const-generics/issues/issue-88119.stderr
@@ -1,3 +1,11 @@
+error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed
+  --> $DIR/issue-88119.rs:4:39
+   |
+LL | #![feature(const_trait_impl, effects, generic_const_exprs)]
+   |                                       ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: remove one of these features
+
 error[E0284]: type annotations needed: cannot normalize `<&T as ConstName>::{constant#0}`
   --> $DIR/issue-88119.rs:19:49
    |
@@ -28,6 +36,6 @@ LL | where
 LL |     [(); name_len::<T>()]:,
    |     --------------------- unsatisfied trait bound introduced here
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.stderr
index 7db6a77c77b..698b1b5b578 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.stderr
@@ -1,3 +1,11 @@
+error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed
+  --> $DIR/const-trait-bounds.rs:4:39
+   |
+LL | #![feature(const_trait_impl, effects, generic_const_exprs)]
+   |                                       ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: remove one of these features
+
 error[E0284]: type annotations needed: cannot normalize `process<T>::{constant#0}`
   --> $DIR/const-trait-bounds.rs:12:35
    |
@@ -16,6 +24,6 @@ error[E0284]: type annotations needed: cannot normalize `process<T>::{constant#1
 LL |     input
    |     ^^^^^ cannot normalize `process<T>::{constant#1}`
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs
index c50c755f667..5fffe54fc1a 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs
@@ -1,3 +1,4 @@
+//@ known-bug: unknown
 // Ensure that we print unsatisfied always-const trait bounds as `const Trait` in diagnostics.
 //@ compile-flags: -Znext-solver
 
@@ -19,7 +20,7 @@ impl Trait for Ty {
 
 fn main() {
     // FIXME(effects): improve diagnostics on this
-    require::<Ty>(); //~ ERROR the trait bound `Trait::{synthetic#0}: const Compat` is not satisfied
+    require::<Ty>();
 }
 
 struct Container<const N: u32>;
@@ -27,9 +28,7 @@ struct Container<const N: u32>;
 // FIXME(effects): Somehow emit `the trait bound `T: const Trait` is not satisfied` here instead
 //                 and suggest changing `Trait` to `const Trait`.
 fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
-//~^ ERROR mismatched types
 
 // FIXME(effects): Instead of suggesting `+ const Trait`, suggest
 //                 changing `~const Trait` to `const Trait`.
 const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-//~^ ERROR mismatched types
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr
index b9f6c9e8835..0806ffa4b5d 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr
@@ -1,5 +1,13 @@
+error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed
+  --> $DIR/unsatisfied-const-trait-bound.rs:5:39
+   |
+LL | #![feature(const_trait_impl, effects, generic_const_exprs)]
+   |                                       ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: remove one of these features
+
 error[E0308]: mismatched types
-  --> $DIR/unsatisfied-const-trait-bound.rs:29:37
+  --> $DIR/unsatisfied-const-trait-bound.rs:30:37
    |
 LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
    |                                     ^^^^^^^^^ expected `false`, found `true`
@@ -17,18 +25,18 @@ LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
               found constant `host`
 
 error[E0277]: the trait bound `Trait::{synthetic#0}: const Compat` is not satisfied
-  --> $DIR/unsatisfied-const-trait-bound.rs:22:15
+  --> $DIR/unsatisfied-const-trait-bound.rs:23:15
    |
 LL |     require::<Ty>();
    |               ^^ the trait `const Compat` is not implemented for `Trait::{synthetic#0}`
    |
 note: required by a bound in `require`
-  --> $DIR/unsatisfied-const-trait-bound.rs:7:15
+  --> $DIR/unsatisfied-const-trait-bound.rs:8:15
    |
 LL | fn require<T: const Trait>() {}
    |               ^^^^^^^^^^^ required by this bound in `require`
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
 Some errors have detailed explanations: E0277, E0308.
 For more information about an error, try `rustc --explain E0277`.