2016-04-21 18:31:04 -05:00
|
|
|
use std::mem;
|
|
|
|
|
|
|
|
trait Misc {}
|
|
|
|
|
|
|
|
fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
|
|
|
|
|
|
|
|
fn main() {
|
2019-05-28 13:46:13 -05:00
|
|
|
size_of_copy::<dyn Misc + Copy>();
|
2017-11-04 16:44:19 -05:00
|
|
|
//~^ ERROR only auto traits can be used as additional traits in a trait object
|
2018-05-26 22:51:50 -05:00
|
|
|
//~| ERROR the trait bound `dyn Misc: std::marker::Copy` is not satisfied
|
2016-04-21 18:31:04 -05:00
|
|
|
}
|