Rustfmt all the things

This commit is contained in:
Oliver Scherer 2019-01-22 16:27:42 +01:00
parent 38cdf63acf
commit d6c806378e

View file

@ -65,12 +65,23 @@ pub fn differing_macro_contexts(lhs: Span, rhs: Span) -> bool {
pub fn in_constant(cx: &LateContext<'_, '_>, id: NodeId) -> bool {
let parent_id = cx.tcx.hir().get_parent(id);
match cx.tcx.hir().get(parent_id) {
| Node::Item(&Item { node: ItemKind::Const(..), .. })
| Node::TraitItem(&TraitItem { node: TraitItemKind::Const(..), .. })
| Node::ImplItem(&ImplItem { node: ImplItemKind::Const(..), .. })
Node::Item(&Item {
node: ItemKind::Const(..),
..
})
| Node::TraitItem(&TraitItem {
node: TraitItemKind::Const(..),
..
})
| Node::ImplItem(&ImplItem {
node: ImplItemKind::Const(..),
..
})
| Node::AnonConst(_)
| Node::Item(&Item { node: ItemKind::Static(..), .. })
=> true,
| Node::Item(&Item {
node: ItemKind::Static(..),
..
}) => true,
_ => false,
}
}