rust/src/test/ui/issues/issue-49934-errors.rs
Vadim Petrochenkov cd2177f3de expand: Stop derive expansion un unexpected targets early
Collect derive placeholders using `collect` instead of `push`
2020-11-19 19:25:20 +03:00

11 lines
256 B
Rust

fn foo<#[derive(Debug)] T>() {
//~^ ERROR `derive` may only be applied to structs, enums and unions
match 0 {
#[derive(Debug)]
//~^ ERROR `derive` may only be applied to structs, enums and unions
_ => (),
}
}
fn main() {
}