Rustup (fixes #2002)

This commit is contained in:
Oliver Schneider
2017-08-30 10:54:24 +02:00
parent c99b67c619
commit 9d6c0feef2
16 changed files with 40 additions and 19 deletions

View File

@@ -104,6 +104,7 @@ 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 MirSource::from_node(cx.tcx, parent_id) {
MirSource::GeneratorDrop(_) |
MirSource::Fn(_) => false,
MirSource::Const(_) |
MirSource::Static(..) |