2021-08-31 18:49:14 -05:00
|
|
|
// build-fail
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
|
|
|
// Ensure that non-object-safe methods in Iterator does not generate
|
|
|
|
// vtable entries.
|
|
|
|
|
|
|
|
#[rustc_dump_vtable]
|
|
|
|
trait A: Iterator {}
|
2021-10-03 01:53:02 -05:00
|
|
|
//~^ error vtable
|
2021-08-31 18:49:14 -05:00
|
|
|
|
|
|
|
impl<T> A for T where T: Iterator {}
|
|
|
|
|
|
|
|
fn foo(_a: &mut dyn A<Item=u8>) {
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
foo(&mut vec![0, 1, 2, 3].into_iter());
|
|
|
|
}
|