Files
rust/tests/ui/traits/vtable/vtable-vacant.rs

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

28 lines
381 B
Rust
Raw Normal View History

2021-07-22 23:29:53 +08:00
#![feature(rustc_attrs)]
#![feature(negative_impls)]
2021-07-22 23:29:53 +08:00
// B --> A
trait A {
fn foo_a1(&self) {}
fn foo_a2(&self) where Self: Send {}
2021-07-22 23:29:53 +08:00
}
trait B: A {
fn foo_b1(&self) {}
fn foo_b2(&self) where Self: Send {}
2021-07-22 23:29:53 +08:00
}
struct S;
impl !Send for S {}
2021-07-22 23:29:53 +08:00
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
2021-07-22 23:29:53 +08:00
2025-01-10 20:09:10 +00:00
#[rustc_dump_vtable]
impl B for S {}
//~^ error vtable
2021-07-22 23:29:53 +08:00
2025-01-10 20:09:10 +00:00
fn main() {}