rust/tests/ui/traits/vtable/vtable-multiple.rs

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

30 lines
333 B
Rust
Raw Normal View History

2021-07-17 15:44:19 +08:00
#![feature(rustc_attrs)]
trait A {
fn foo_a(&self) {}
}
trait B {
fn foo_b(&self) {}
}
trait C: A + B {
fn foo_c(&self) {}
}
struct S;
2025-01-10 20:09:10 +00:00
#[rustc_dump_vtable]
2021-07-17 15:44:19 +08:00
impl A for S {}
2025-01-10 20:09:10 +00:00
//~^ error vtable
#[rustc_dump_vtable]
2021-07-17 15:44:19 +08:00
impl B for S {}
2025-01-10 20:09:10 +00:00
//~^ error vtable
2021-07-17 15:44:19 +08:00
2025-01-10 20:09:10 +00:00
#[rustc_dump_vtable]
impl C for S {}
//~^ error vtable
2021-07-17 15:44:19 +08:00
2025-01-10 20:09:10 +00:00
fn main() {}