mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
13 lines
317 B
Rust
13 lines
317 B
Rust
// `ty` matcher accepts trait object types
|
|
|
|
macro_rules! m {
|
|
($t: ty) => ( let _: $t; )
|
|
}
|
|
|
|
fn main() {
|
|
m!(dyn Copy + Send + 'static);
|
|
//~^ ERROR the trait `Copy` cannot be made into an object
|
|
m!(dyn 'static + Send);
|
|
m!(dyn 'static +); //~ ERROR at least one trait is required for an object type
|
|
}
|