mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Upgrade to rustc 1.38.0-nightly (4b65a86eb 2019-07-15)
This commit is contained in:
parent
b6bd2d7302
commit
d3718823ba
5 changed files with 12 additions and 8 deletions
|
@ -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")
|
||||
|
@ -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,
|
||||
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue