blob: be59d3522b865d228580f1c92eee6785d3b835db (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
use std::mem;
trait Misc {}
fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
fn main() {
size_of_copy::<Misc+Copy>();
//~^ ERROR only auto traits can be used as additional traits in a trait object
//~| ERROR the trait bound `dyn Misc: std::marker::Copy` is not satisfied
}
|