rust/tests/ui/crashes/ice-11422.fixed
2025-01-13 15:59:34 +01:00

25 lines
457 B
Rust

#![warn(clippy::implied_bounds_in_impls)]
use std::fmt::Debug;
use std::ops::*;
fn r#gen() -> impl PartialOrd + Debug {}
struct Bar {}
trait Foo<T = Self> {}
trait FooNested<T = Option<Self>> {}
impl Foo for Bar {}
impl FooNested for Bar {}
fn foo() -> impl Foo + FooNested {
Bar {}
}
fn test_impl_ops() -> impl Add + Sub + Mul + Div {
1
}
fn test_impl_assign_ops() -> impl AddAssign + SubAssign + MulAssign + DivAssign {
1
}
fn main() {}