mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
12 lines
299 B
Rust
12 lines
299 B
Rust
use std::mem;
|
|
|
|
trait Misc {}
|
|
|
|
fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
|
|
|
|
fn main() {
|
|
size_of_copy::<dyn Misc + Copy>();
|
|
//~^ ERROR only auto traits can be used as additional traits in a trait object
|
|
//~| ERROR the trait bound `dyn Misc: Copy` is not satisfied
|
|
}
|