mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Upgrade to rustc 1.38.0-nightly (4b65a86eb 2019-07-15)
This commit is contained in:
parent
b6bd2d7302
commit
d3718823ba
5 changed files with 12 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue