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() {
|
|
|
|
size_of_copy::<Misc+Copy>();
|
2017-11-04 19:44:19 -02:00
|
|
|
//~^ ERROR only auto traits can be used as additional traits in a trait object
|
2018-05-26 20:51:50 -07:00
|
|
|
//~| ERROR the trait bound `dyn Misc: std::marker::Copy` is not satisfied
|
2016-04-22 02:31:04 +03:00
|
|
|
}
|