Skip to content

Commit

Permalink
amend to Switch can_eq and can_sub to DefineOpaqueTypes::Yes
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Apr 4, 2024
1 parent 169a045 commit ba316a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ui/impl-trait/nested_impl_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn fine(x: impl Into<u32>) -> impl Into<u32> { x }

fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
//~^ ERROR nested `impl Trait` is not allowed
//~| ERROR the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
//~| ERROR the trait bound `impl Into<u32>: Into<impl Debug>` is not satisfied

fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
//~^ ERROR nested `impl Trait` is not allowed
Expand All @@ -18,7 +18,7 @@ struct X;
impl X {
fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
//~^ ERROR nested `impl Trait` is not allowed
//~| ERROR the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
//~| ERROR the trait bound `impl Into<u32>: Into<impl Debug>` is not satisfied
}

fn allowed_in_assoc_type() -> impl Iterator<Item=impl Fn()> {
Expand Down

0 comments on commit ba316a9

Please sign in to comment.