Skip to content

Commit

Permalink
Upgrade to rustc 1.38.0-nightly (4b65a86eb 2019-07-15)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Jul 17, 2019
1 parent b6bd2d7 commit d371882
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions components/script_plugins/lib.rs
Expand Up @@ -22,6 +22,10 @@
#[macro_use]
extern crate rustc;

// Work around TLS failure: https://github.com/rust-lang/rust/issues/62717#issuecomment-511876555
#[allow(unused)]
extern crate rustc_driver;

extern crate rustc_plugin;
extern crate syntax;

Expand Down
6 changes: 3 additions & 3 deletions components/script_plugins/unrooted_must_root.rs
Expand Up @@ -161,7 +161,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
.all(|a| !a.check_name(self.symbols.must_root))
{
for ref field in def.fields() {
let def_id = cx.tcx.hir().local_def_id_from_hir_id(field.hir_id);
let def_id = cx.tcx.hir().local_def_id(field.hir_id);
if is_unrooted_ty(&self.symbols, cx, cx.tcx.type_of(def_id), false) {
cx.span_lint(UNROOTED_MUST_ROOT, field.span,
"Type must be rooted, use #[must_root] on the struct definition to propagate")
Expand All @@ -182,7 +182,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
match var.node.data {
hir::VariantData::Tuple(ref fields, ..) => {
for ref field in fields {
let def_id = cx.tcx.hir().local_def_id_from_hir_id(field.hir_id);
let def_id = cx.tcx.hir().local_def_id(field.hir_id);
if is_unrooted_ty(&self.symbols, cx, cx.tcx.type_of(def_id), false) {
cx.span_lint(
UNROOTED_MUST_ROOT,
Expand Down Expand Up @@ -215,7 +215,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
};

if !in_derive_expn(span) {
let def_id = cx.tcx.hir().local_def_id_from_hir_id(id);
let def_id = cx.tcx.hir().local_def_id(id);
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()) {
Expand Down
4 changes: 2 additions & 2 deletions components/script_plugins/utils.rs
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions components/script_plugins/webidl_must_inherit.rs
Expand Up @@ -185,7 +185,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for WebIdlPass {
_gen: &'tcx hir::Generics,
id: HirId,
) {
let def_id = cx.tcx.hir().local_def_id_from_hir_id(id);
let def_id = cx.tcx.hir().local_def_id(id);
if !is_webidl_ty(&self.symbols, cx, cx.tcx.type_of(def_id)) {
return;
}
Expand All @@ -196,7 +196,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for WebIdlPass {
};

let parent_name = def.fields().iter().next().map(|field| {
let def_id = cx.tcx.hir().local_def_id_from_hir_id(field.hir_id);
let def_id = cx.tcx.hir().local_def_id(field.hir_id);
let ty = cx.tcx.type_of(def_id).to_string();
get_ty_name(&ty).to_string()
});
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
@@ -1 +1 @@
nightly-2019-07-04
nightly-2019-07-16

0 comments on commit d371882

Please sign in to comment.