Skip to content

Commit 6fd7d85

Browse files
Fix some merge fallout.
1 parent a69eaf6 commit 6fd7d85

File tree

6 files changed

+4
-15
lines changed

6 files changed

+4
-15
lines changed

src/librustc/hir/def_id.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,4 @@ impl DefId {
201201
pub fn is_local(&self) -> bool {
202202
self.krate == LOCAL_CRATE
203203
}
204-
205-
pub fn invalid() -> DefId {
206-
DefId {
207-
krate: INVALID_CRATE,
208-
index: CRATE_DEF_INDEX,
209-
}
210-
}
211204
}

src/librustc/middle/dead.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
119119

120120
fn handle_field_pattern_match(&mut self, lhs: &hir::Pat, def: Def,
121121
pats: &[codemap::Spanned<hir::FieldPat>]) {
122-
123-
124122
let variant = match self.tables.node_id_to_type(lhs.hir_id).sty {
125123
ty::TyAdt(adt, _) => adt.variant_of_def(def),
126124
_ => span_bug!(lhs.span, "non-ADT in struct pattern")

src/librustc/ty/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ pub struct LocalTableInContextMut<'a, V: 'a> {
285285
}
286286

287287
impl<'a, V> LocalTableInContextMut<'a, V> {
288-
289288
pub fn get_mut(&mut self, id: hir::HirId) -> Option<&mut V> {
290289
validate_hir_id_for_typeck_tables(self.local_id_root, id, true);
291290
self.data.get_mut(&id.local_id)

src/librustc_borrowck/borrowck/gather_loans/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ impl<'a, 'tcx> GatherLoanCtxt<'a, 'tcx> {
449449
}
450450
None
451451
}
452-
LpUpvar(ty::UpvarId{ var_id: local_id, closure_expr_id: _ }) => {
452+
LpUpvar(ty::UpvarId{ var_id, closure_expr_id: _ }) => {
453+
let local_id = self.tcx().hir.def_index_to_node_id(var_id);
453454
self.tcx().used_mut_nodes.borrow_mut().insert(local_id);
454455
None
455456
}

src/librustc_lint/unused.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults {
155155
let maybe_def = match expr.node {
156156
hir::ExprCall(ref callee, _) => {
157157
match callee.node {
158-
hir::ExprPath(ref qpath) => Some(cx.tables.qpath_def(qpath, callee.id)),
158+
hir::ExprPath(ref qpath) => Some(cx.tables.qpath_def(qpath, callee.hir_id)),
159159
_ => None
160160
}
161161
},
162162
hir::ExprMethodCall(..) => {
163-
cx.tables.type_dependent_defs.get(&expr.id).cloned()
163+
cx.tables.type_dependent_defs().get(expr.hir_id).cloned()
164164
},
165165
_ => { None }
166166
};

src/librustc_privacy/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,10 +1655,8 @@ fn privacy_access_levels<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
16551655
assert_eq!(krate, LOCAL_CRATE);
16561656

16571657
let krate = tcx.hir.krate();
1658-
16591658
let empty_tables = ty::TypeckTables::empty(None);
16601659

1661-
16621660
// Check privacy of names not checked in previous compilation stages.
16631661
let mut visitor = NamePrivacyVisitor {
16641662
tcx: tcx,

0 commit comments

Comments
 (0)