mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Upgrade to rustc 1.34.0-nightly (097c04cf4 2019-02-24)
This commit is contained in:
parent
a28e15e4ea
commit
7bb7c9a1e3
2 changed files with 11 additions and 11 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
use crate::utils::{in_derive_expn, match_def_path};
|
use crate::utils::{in_derive_expn, match_def_path};
|
||||||
use rustc::hir::intravisit as visit;
|
use rustc::hir::intravisit as visit;
|
||||||
use rustc::hir::{self, ExprKind};
|
use rustc::hir::{self, ExprKind, HirId};
|
||||||
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
|
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
|
||||||
use rustc::ty;
|
use rustc::ty;
|
||||||
use syntax::{ast, source_map};
|
use syntax::{ast, source_map};
|
||||||
|
@ -113,15 +113,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
/// All structs containing #[must_root] types must be #[must_root] themselves
|
/// All structs containing #[must_root] types must be #[must_root] themselves
|
||||||
fn check_struct_def(
|
fn check_struct_def(
|
||||||
&mut self,
|
&mut self,
|
||||||
cx: &LateContext,
|
cx: &LateContext<'a, 'tcx>,
|
||||||
def: &hir::VariantData,
|
def: &'tcx hir::VariantData,
|
||||||
_n: ast::Name,
|
_n: ast::Name,
|
||||||
_gen: &hir::Generics,
|
_gen: &'tcx hir::Generics,
|
||||||
id: ast::NodeId,
|
id: HirId,
|
||||||
) {
|
) {
|
||||||
let item = match cx.tcx.hir().get(id) {
|
let item = match cx.tcx.hir().get_by_hir_id(id) {
|
||||||
hir::Node::Item(item) => item,
|
hir::Node::Item(item) => item,
|
||||||
_ => cx.tcx.hir().expect_item(cx.tcx.hir().get_parent(id)),
|
_ => cx.tcx.hir().expect_item_by_hir_id(cx.tcx.hir().get_parent_item(id)),
|
||||||
};
|
};
|
||||||
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
|
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
|
||||||
for ref field in def.fields() {
|
for ref field in def.fields() {
|
||||||
|
@ -165,11 +165,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
fn check_fn(
|
fn check_fn(
|
||||||
&mut self,
|
&mut self,
|
||||||
cx: &LateContext<'a, 'tcx>,
|
cx: &LateContext<'a, 'tcx>,
|
||||||
kind: visit::FnKind,
|
kind: visit::FnKind<'tcx>,
|
||||||
decl: &'tcx hir::FnDecl,
|
decl: &'tcx hir::FnDecl,
|
||||||
body: &'tcx hir::Body,
|
body: &'tcx hir::Body,
|
||||||
span: source_map::Span,
|
span: source_map::Span,
|
||||||
id: ast::NodeId,
|
id: HirId,
|
||||||
) {
|
) {
|
||||||
let in_new_function = match kind {
|
let in_new_function = match kind {
|
||||||
visit::FnKind::ItemFn(n, _, _, _, _) | visit::FnKind::Method(n, _, _, _) => {
|
visit::FnKind::ItemFn(n, _, _, _, _) | visit::FnKind::Method(n, _, _, _) => {
|
||||||
|
@ -179,7 +179,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
};
|
};
|
||||||
|
|
||||||
if !in_derive_expn(span) {
|
if !in_derive_expn(span) {
|
||||||
let def_id = cx.tcx.hir().local_def_id(id);
|
let def_id = cx.tcx.hir().local_def_id_from_hir_id(id);
|
||||||
let sig = cx.tcx.type_of(def_id).fn_sig(cx.tcx);
|
let sig = cx.tcx.type_of(def_id).fn_sig(cx.tcx);
|
||||||
|
|
||||||
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) {
|
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2019-01-28
|
nightly-2019-02-25
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue