expand: Mark some dead code in derive expansion as unreachable
This commit is contained in:
parent
cd2177f3de
commit
d575aa4d58
4 changed files with 5 additions and 54 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue