1
Fork 0

expand: Mark some dead code in derive expansion as unreachable

This commit is contained in:
Vadim Petrochenkov 2020-11-19 01:55:59 +03:00
parent cd2177f3de
commit d575aa4d58
4 changed files with 5 additions and 54 deletions

View file

@ -98,13 +98,7 @@ fn inject_impl_of_structural_trait(
) {
let item = match *item {
Annotatable::Item(ref item) => item,
_ => {
// Non-Item derive is an error, but it should have been
// set earlier; see
// librustc_expand/expand.rs:MacroExpander::fully_expand_fragment()
// librustc_expand/base.rs:Annotatable::derive_allowed()
return;
}
_ => unreachable!(),
};
let generics = match item.kind {