os-rust/tests/ui/traits/issue-105231.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
333 B
Rust
Raw Normal View History

2023-06-02 09:22:57 +08:00
struct A<T>(B<T>);
//~^ ERROR recursive types `A` and `B` have infinite size
//~| ERROR `T` is only used recursively
2023-06-02 09:22:57 +08:00
struct B<T>(A<A<T>>);
//~^ ERROR `T` is only used recursively
2023-06-02 09:22:57 +08:00
trait Foo {}
impl<T> Foo for T where T: Send {}
impl Foo for B<u8> {}
2024-09-21 07:02:51 +00:00
//~^ ERROR conflicting implementations of trait `Foo` for type `B<u8>`
2023-06-02 09:22:57 +08:00
fn main() {}