about summary refs log tree commit diff
path: root/tests/ui/consts/const-try.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-try.rs')
-rw-r--r--tests/ui/consts/const-try.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/ui/consts/const-try.rs b/tests/ui/consts/const-try.rs
index e13fad78441..152400d702e 100644
--- a/tests/ui/consts/const-try.rs
+++ b/tests/ui/consts/const-try.rs
@@ -1,4 +1,6 @@
-//@ compile-flags: -Znext-solver
+//@ check-pass
+//@ revisions: current next
+//@[next] compile-flags: -Znext-solver
 
 // Demonstrates what's needed to make use of `?` in const contexts.
 
@@ -13,14 +15,12 @@ struct TryMe;
 struct Error;
 
 impl const FromResidual<Error> for TryMe {
-    //~^ ERROR const `impl` for trait `FromResidual` which is not `const`
     fn from_residual(residual: Error) -> Self {
         TryMe
     }
 }
 
 impl const Try for TryMe {
-    //~^ ERROR const `impl` for trait `Try` which is not `const`
     type Output = ();
     type Residual = Error;
     fn from_output(output: Self::Output) -> Self {
@@ -33,8 +33,6 @@ impl const Try for TryMe {
 
 const fn t() -> TryMe {
     TryMe?;
-    //~^ ERROR `?` is not allowed on
-    //~| ERROR `?` is not allowed on
     TryMe
 }