Skip to content

Commit

Permalink
Remove feature(control_flow_enum) in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmcm committed Sep 26, 2024
1 parent c89b873 commit ddfd0c7
Show file tree
Hide file tree
Showing 21 changed files with 8 additions and 29 deletions.
1 change: 0 additions & 1 deletion tests/mir-opt/jump_threading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//@ compile-flags: -Zmir-enable-passes=+Inline
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

#![feature(control_flow_enum)]
#![feature(try_trait_v2)]
#![feature(custom_mir, core_intrinsics, rustc_attrs)]

Expand Down
1 change: 0 additions & 1 deletion tests/mir-opt/separate_const_switch.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// skip-filecheck
#![feature(control_flow_enum)]
#![feature(try_trait_v2)]

//@ compile-flags: -Zunsound-mir-opts
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]
#![feature(ascii_char, ascii_char_variants)]

extern crate rustc_hir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]
#![feature(ascii_char, ascii_char_variants)]

extern crate rustc_hir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837

#![feature(rustc_private)]
#![feature(control_flow_enum)]

extern crate rustc_hir;
#[macro_use]
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_def_ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

#[macro_use]
extern crate rustc_smir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

#[macro_use]
extern crate rustc_smir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_foreign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

extern crate rustc_middle;
#[macro_use]
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

#[macro_use]
extern crate rustc_smir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_item_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

#[macro_use]
extern crate rustc_smir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_trait_queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

#[macro_use]
extern crate rustc_smir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]
#![feature(ascii_char, ascii_char_variants)]

extern crate rustc_hir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/check_ty_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

#[macro_use]
extern crate rustc_smir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/crate-info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

extern crate rustc_hir;
#[macro_use]
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/projections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

extern crate rustc_hir;
#[macro_use]
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/smir_internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

#[macro_use]
extern crate rustc_smir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/smir_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

#[macro_use]
extern crate rustc_smir;
Expand Down
1 change: 0 additions & 1 deletion tests/ui-fulldeps/stable-mir/smir_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#![feature(rustc_private)]
#![feature(assert_matches)]
#![feature(control_flow_enum)]

#[macro_use]
extern crate rustc_smir;
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/try-trait/bad-interconversion.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(control_flow_enum)]

use std::ops::ControlFlow;

fn result_to_result() -> Result<u64, u8> {
Expand Down
16 changes: 8 additions & 8 deletions tests/ui/try-trait/bad-interconversion.stderr
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand Down
1 change: 0 additions & 1 deletion tests/ui/try-trait/try-operator-custom.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ run-pass

#![feature(control_flow_enum)]
#![feature(try_trait_v2)]

use std::ops::{ControlFlow, FromResidual, Try};
Expand Down

0 comments on commit ddfd0c7

Please sign in to comment.