about summary refs log tree commit diff
path: root/tests/ui/try-trait
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2024-09-18 11:09:41 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2024-09-25 19:00:19 -0700
commitddfd0c701ad60f6e31cca13d544a9abd24bc56cb (patch)
treed15c783b0ed19e6c786e2a68bf647ec22895b802 /tests/ui/try-trait
parentc89b873172af7e2448fc89da62948623e9e7bc47 (diff)
downloadrust-ddfd0c701ad60f6e31cca13d544a9abd24bc56cb.tar.gz
rust-ddfd0c701ad60f6e31cca13d544a9abd24bc56cb.zip
Remove `feature(control_flow_enum)` in tests
Diffstat (limited to 'tests/ui/try-trait')
-rw-r--r--tests/ui/try-trait/bad-interconversion.rs2
-rw-r--r--tests/ui/try-trait/bad-interconversion.stderr16
-rw-r--r--tests/ui/try-trait/try-operator-custom.rs1
3 files changed, 8 insertions, 11 deletions
diff --git a/tests/ui/try-trait/bad-interconversion.rs b/tests/ui/try-trait/bad-interconversion.rs
index 385f5510fb4..9c45bde8898 100644
--- a/tests/ui/try-trait/bad-interconversion.rs
+++ b/tests/ui/try-trait/bad-interconversion.rs
@@ -1,5 +1,3 @@
-#![feature(control_flow_enum)]
-
 use std::ops::ControlFlow;
 
 fn result_to_result() -> Result<u64, u8> {
diff --git a/tests/ui/try-trait/bad-interconversion.stderr b/tests/ui/try-trait/bad-interconversion.stderr
index 9aab2cf6ab8..82877baef3e 100644
--- a/tests/ui/try-trait/bad-interconversion.stderr
+++ b/tests/ui/try-trait/bad-interconversion.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `?` couldn't convert the error to `u8`
-  --> $DIR/bad-interconversion.rs:6:20
+  --> $DIR/bad-interconversion.rs:4:20
    |
 LL | fn result_to_result() -> Result<u64, u8> {
    |                          --------------- expected `u8` because of this
@@ -15,7 +15,7 @@ LL |     Ok(Err(123_i32)?)
    = note: required for `Result<u64, u8>` to implement `FromResidual<Result<Infallible, i32>>`
 
 error[E0277]: the `?` operator can only be used on `Result`s, not `Option`s, in a function that returns `Result`
-  --> $DIR/bad-interconversion.rs:11:12
+  --> $DIR/bad-interconversion.rs:9:12
    |
 LL | fn option_to_result() -> Result<u64, String> {
    | -------------------------------------------- this function returns a `Result`
@@ -26,7 +26,7 @@ LL |     Some(3)?;
    = help: the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`
 
 error[E0277]: the `?` operator can only be used on `Result`s in a function that returns `Result`
-  --> $DIR/bad-interconversion.rs:17:31
+  --> $DIR/bad-interconversion.rs:15:31
    |
 LL | fn control_flow_to_result() -> Result<u64, String> {
    | -------------------------------------------------- this function returns a `Result`
@@ -37,7 +37,7 @@ LL |     Ok(ControlFlow::Break(123)?)
    = help: the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`
 
 error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a function that returns `Option`
-  --> $DIR/bad-interconversion.rs:22:22
+  --> $DIR/bad-interconversion.rs:20:22
    |
 LL | fn result_to_option() -> Option<u16> {
    | ------------------------------------ this function returns an `Option`
@@ -48,7 +48,7 @@ LL |     Some(Err("hello")?)
    = help: the trait `FromResidual<Option<Infallible>>` is implemented for `Option<T>`
 
 error[E0277]: the `?` operator can only be used on `Option`s in a function that returns `Option`
-  --> $DIR/bad-interconversion.rs:27:33
+  --> $DIR/bad-interconversion.rs:25:33
    |
 LL | fn control_flow_to_option() -> Option<u64> {
    | ------------------------------------------ this function returns an `Option`
@@ -59,7 +59,7 @@ LL |     Some(ControlFlow::Break(123)?)
    = help: the trait `FromResidual<Option<Infallible>>` is implemented for `Option<T>`
 
 error[E0277]: the `?` operator can only be used on `ControlFlow`s in a function that returns `ControlFlow`
-  --> $DIR/bad-interconversion.rs:32:39
+  --> $DIR/bad-interconversion.rs:30:39
    |
 LL | fn result_to_control_flow() -> ControlFlow<String> {
    | -------------------------------------------------- this function returns a `ControlFlow`
@@ -71,7 +71,7 @@ LL |     ControlFlow::Continue(Err("hello")?)
    = help: for that trait implementation, expected `ControlFlow<String, Infallible>`, found `Result<Infallible, &str>`
 
 error[E0277]: the `?` operator can only be used on `ControlFlow`s in a function that returns `ControlFlow`
-  --> $DIR/bad-interconversion.rs:37:12
+  --> $DIR/bad-interconversion.rs:35:12
    |
 LL | fn option_to_control_flow() -> ControlFlow<u64> {
    | ----------------------------------------------- this function returns a `ControlFlow`
@@ -83,7 +83,7 @@ LL |     Some(3)?;
    = help: for that trait implementation, expected `ControlFlow<u64, Infallible>`, found `Option<Infallible>`
 
 error[E0277]: the `?` operator in a function that returns `ControlFlow<B, _>` can only be used on other `ControlFlow<B, _>`s (with the same Break type)
-  --> $DIR/bad-interconversion.rs:43:29
+  --> $DIR/bad-interconversion.rs:41:29
    |
 LL | fn control_flow_to_control_flow() -> ControlFlow<i64> {
    | ----------------------------------------------------- this function returns a `ControlFlow`
diff --git a/tests/ui/try-trait/try-operator-custom.rs b/tests/ui/try-trait/try-operator-custom.rs
index 936c0b0689a..ebeb0869f98 100644
--- a/tests/ui/try-trait/try-operator-custom.rs
+++ b/tests/ui/try-trait/try-operator-custom.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 
-#![feature(control_flow_enum)]
 #![feature(try_trait_v2)]
 
 use std::ops::{ControlFlow, FromResidual, Try};