2016-04-22 02:31:04 +03:00
|
|
|
use std::mem;
|
|
|
|
|
|
|
|
trait Misc {}
|
|
|
|
|
|
|
|
fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
|
|
|
|
|
|
|
|
fn main() {
|
2019-05-28 14:46:13 -04:00
|
|
|
size_of_copy::<dyn Misc + Copy>();
|
2017-11-04 19:44:19 -02:00
|
|
|
//~^ ERROR only auto traits can be used as additional traits in a trait object
|
2020-09-02 10:40:56 +03:00
|
|
|
//~| ERROR the trait bound `dyn Misc: Copy` is not satisfied
|
2016-04-22 02:31:04 +03:00
|
|
|
}
|