2017-03-17 00:47:32 +03:00
|
|
|
// `ty` matcher accepts trait object types
|
|
|
|
|
|
|
|
|
|
macro_rules! m {
|
|
|
|
|
($t: ty) => ( let _: $t; )
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
m!(Copy + Send + 'static); //~ ERROR the trait `std::marker::Copy` cannot be made into an object
|
2017-02-22 23:59:40 +03:00
|
|
|
m!('static + Send);
|
|
|
|
|
m!('static +); //~ ERROR at least one non-builtin trait is required for an object type
|
2017-03-17 00:47:32 +03:00
|
|
|
}
|