mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Upgrade to rustc 1.29.0-nightly (e06c87544 2018-07-06)
This commit is contained in:
parent
1b9d8fa674
commit
a09899be99
3 changed files with 5 additions and 5 deletions
|
@ -7,7 +7,7 @@ use rustc::hir::intravisit as visit;
|
|||
use rustc::hir::map as ast_map;
|
||||
use rustc::lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext};
|
||||
use rustc::ty;
|
||||
use syntax::{ast, codemap};
|
||||
use syntax::{ast, codemap, symbol::Ident};
|
||||
use utils::{match_def_path, in_derive_expn};
|
||||
|
||||
declare_lint!(UNROOTED_MUST_ROOT, Deny,
|
||||
|
@ -133,8 +133,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
|||
span: codemap::Span,
|
||||
id: ast::NodeId) {
|
||||
let in_new_function = match kind {
|
||||
visit::FnKind::ItemFn(n, _, _, _, _, _, _) |
|
||||
visit::FnKind::Method(n, _, _, _) => {
|
||||
visit::FnKind::ItemFn(n, _, _, _, _) |
|
||||
visit::FnKind::Method(Ident { name: n, .. }, _, _, _) => {
|
||||
&*n.as_str() == "new" || n.as_str().starts_with("new_")
|
||||
}
|
||||
visit::FnKind::Closure(_) => return,
|
||||
|
|
|
@ -30,7 +30,7 @@ pub fn match_def_path(cx: &LateContext, def_id: DefId, path: &[&str]) -> bool {
|
|||
|
||||
pub fn in_derive_expn(span: Span) -> bool {
|
||||
if let Some(i) = span.ctxt().outer().expn_info() {
|
||||
if let ExpnFormat::MacroAttribute(n) = i.callee.format {
|
||||
if let ExpnFormat::MacroAttribute(n) = i.format {
|
||||
n.as_str().contains("derive")
|
||||
} else {
|
||||
false
|
||||
|
|
|
@ -1 +1 @@
|
|||
nightly-2018-06-13
|
||||
nightly-2018-07-07
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue