Upgrade to rustc 1.38.0-nightly (4b65a86eb 2019-07-15)

This commit is contained in:
Simon Sapin 2019-07-06 13:45:21 +02:00
parent b6bd2d7302
commit d3718823ba
5 changed files with 12 additions and 8 deletions

View file

@ -4,7 +4,7 @@
use rustc::hir::def_id::DefId;
use rustc::lint::LateContext;
use syntax::source_map::{ExpnFormat, Span};
use syntax::source_map::{ExpnKind, MacroKind, Span};
use syntax::symbol::Symbol;
/// check if a DefId's path matches the given absolute type path
@ -31,7 +31,7 @@ pub fn match_def_path(cx: &LateContext, def_id: DefId, path: &[Symbol]) -> bool
pub fn in_derive_expn(span: Span) -> bool {
if let Some(i) = span.ctxt().outer().expn_info() {
if let ExpnFormat::MacroAttribute(n) = i.format {
if let ExpnKind::Macro(MacroKind::Attr, n) = i.kind {
n.as_str().contains("derive")
} else {
false