mirror of
https://github.com/servo/servo.git
synced 2025-07-30 02:30:21 +01:00
Update rustc to 1.18.0-nightly (b0a4074c5 2017-04-26)
This commit is contained in:
parent
e5762cb695
commit
c234bf92d0
2 changed files with 4 additions and 4 deletions
|
@ -95,7 +95,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
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() {
|
||||||
let def_id = cx.tcx.hir.local_def_id(field.id);
|
let def_id = cx.tcx.hir.local_def_id(field.id);
|
||||||
if is_unrooted_ty(cx, cx.tcx.item_type(def_id), false) {
|
if is_unrooted_ty(cx, cx.tcx.type_of(def_id), false) {
|
||||||
cx.span_lint(UNROOTED_MUST_ROOT, field.span,
|
cx.span_lint(UNROOTED_MUST_ROOT, field.span,
|
||||||
"Type must be rooted, use #[must_root] on the struct definition to propagate")
|
"Type must be rooted, use #[must_root] on the struct definition to propagate")
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
||||||
hir::VariantData::Tuple(ref fields, _) => {
|
hir::VariantData::Tuple(ref fields, _) => {
|
||||||
for ref field in 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(field.id);
|
||||||
if is_unrooted_ty(cx, cx.tcx.item_type(def_id), false) {
|
if is_unrooted_ty(cx, cx.tcx.type_of(def_id), false) {
|
||||||
cx.span_lint(UNROOTED_MUST_ROOT, field.ty.span,
|
cx.span_lint(UNROOTED_MUST_ROOT, field.ty.span,
|
||||||
"Type must be rooted, use #[must_root] on \
|
"Type must be rooted, use #[must_root] on \
|
||||||
the enum definition to propagate")
|
the enum definition to propagate")
|
||||||
|
@ -140,7 +140,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(id);
|
||||||
let ty = cx.tcx.item_type(def_id);
|
let ty = cx.tcx.type_of(def_id);
|
||||||
|
|
||||||
for (arg, ty) in decl.inputs.iter().zip(ty.fn_args().0.iter()) {
|
for (arg, ty) in decl.inputs.iter().zip(ty.fn_args().0.iter()) {
|
||||||
if is_unrooted_ty(cx, ty, false) {
|
if is_unrooted_ty(cx, ty, false) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
23de823e93dc19ef1b9cb65b48860a892cd6ff18
|
b0a4074c5e87d24ff630f6aa456a64698bff3ed2
|
Loading…
Add table
Add a link
Reference in a new issue