Skip to content
Permalink
Browse files

Upgrade to rustc 1.34.0-nightly (0ea22717a 2019-03-02)

  • Loading branch information...
SimonSapin committed Mar 3, 2019
1 parent 4d8d54f commit 99b898753f35c6e39afc7fdbf95cd47ca3917890
@@ -71,7 +71,7 @@ pub trait IDLInterface {
/// A trait to mark an IDL interface as deriving from another one.
#[cfg_attr(
feature = "unstable",
rustc_on_unimplemented = "The IDL interface `{Self}` is not derived from `{T}`."
rustc_on_unimplemented(message = "The IDL interface `{Self}` is not derived from `{T}`.")
)]
pub trait DerivedFrom<T: Castable>: Castable {}

@@ -7,7 +7,6 @@
#![feature(const_fn)]
#![feature(drain_filter)]
#![feature(plugin)]
#![feature(try_from)]
#![feature(type_alias_enum_variants)]
#![deny(unsafe_code)]
#![allow(non_snake_case)]
@@ -128,7 +128,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
};
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
for ref field in def.fields() {
let def_id = cx.tcx.hir().local_def_id(field.id);
let def_id = cx.tcx.hir().local_def_id_from_hir_id(field.hir_id);
if is_unrooted_ty(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")
@@ -141,15 +141,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant, _gen: &hir::Generics) {
let ref map = cx.tcx.hir();
if map
.expect_item(map.get_parent(var.node.data.id()))
.expect_item_by_hir_id(map.get_parent_item(var.node.data.hir_id()))
.attrs
.iter()
.all(|a| !a.check_name("must_root"))
{
match var.node.data {
hir::VariantData::Tuple(ref fields, ..) => {
for ref field in fields {
let def_id = cx.tcx.hir().local_def_id(field.id);
let def_id = cx.tcx.hir().local_def_id_from_hir_id(field.hir_id);
if is_unrooted_ty(cx, cx.tcx.type_of(def_id), false) {
cx.span_lint(
UNROOTED_MUST_ROOT,
@@ -1 +1 @@
nightly-2019-02-25
nightly-2019-03-03

0 comments on commit 99b8987

Please sign in to comment.
You can’t perform that action at this time.