summary refs log tree commit diff
path: root/src/test/ui/traits/trait-object-macro-matcher.rs
blob: a6852569f3a12b85cfd9c882a17671176c7c6d48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// `ty` matcher accepts trait object types

macro_rules! m {
    ($t: ty) => ( let _: $t; )
}

fn main() {
    m!(dyn Copy + Send + 'static);
    //~^ ERROR the trait `std::marker::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
}