Files
rust/tests/ui/traits/vtable/vtable-multi-level.rs

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

135 lines
1.8 KiB
Rust
Raw Normal View History

2021-07-22 23:29:53 +08:00
#![feature(rustc_attrs)]
// O --> G --> C --> A
// \ \ \-> B
// | |-> F --> D
// | \-> E
// |-> N --> J --> H
// \ \-> I
// |-> M --> K
// \-> L
trait A {
fn foo_a(&self) {}
}
trait B {
fn foo_b(&self) {}
}
trait C: A + B {
fn foo_c(&self) {}
}
trait D {
fn foo_d(&self) {}
}
trait E {
fn foo_e(&self) {}
}
trait F: D + E {
fn foo_f(&self) {}
}
trait G: C + F {
fn foo_g(&self) {}
}
trait H {
fn foo_h(&self) {}
}
trait I {
fn foo_i(&self) {}
}
trait J: H + I {
fn foo_j(&self) {}
}
trait K {
fn foo_k(&self) {}
}
trait L {
fn foo_l(&self) {}
}
trait M: K + L {
fn foo_m(&self) {}
}
trait N: J + M {
fn foo_n(&self) {}
}
trait O: G + N {
fn foo_o(&self) {}
}
struct S;
2025-01-10 20:09:10 +00:00
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl A for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl B for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl C for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl D for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl E for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl F for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl G for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl H for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl I for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl J for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl K for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl L for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl M for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
#[rustc_dump_vtable]
2021-07-22 23:29:53 +08:00
impl N for S {}
2025-01-10 20:09:10 +00:00
//~^ ERROR vtable entries
2021-07-22 23:29:53 +08:00
2025-01-10 20:09:10 +00:00
#[rustc_dump_vtable]
impl O for S {}
//~^ ERROR vtable entries
2021-07-22 23:29:53 +08:00
2025-01-10 20:09:10 +00:00
fn main() {}