2017-03-17 00:47:32 +03:00
|
|
|
// `ty` matcher accepts trait object types
|
|
|
|
|
|
|
|
macro_rules! m {
|
|
|
|
($t: ty) => ( let _: $t; )
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2019-05-28 14:46:13 -04:00
|
|
|
m!(dyn Copy + Send + 'static);
|
2020-09-02 10:40:56 +03:00
|
|
|
//~^ ERROR the trait `Copy` cannot be made into an object
|
2019-05-28 14:46:13 -04:00
|
|
|
m!(dyn 'static + Send);
|
2019-06-22 00:12:28 +08:00
|
|
|
m!(dyn 'static +); //~ ERROR at least one trait is required for an object type
|
2017-03-17 00:47:32 +03:00
|
|
|
}
|