Fix some merge fallout.
This commit is contained in:
parent
a69eaf62c5
commit
6fd7d8586c
6 changed files with 4 additions and 15 deletions
|
@ -201,11 +201,4 @@ impl DefId {
|
|||
pub fn is_local(&self) -> bool {
|
||||
self.krate == LOCAL_CRATE
|
||||
}
|
||||
|
||||
pub fn invalid() -> DefId {
|
||||
DefId {
|
||||
krate: INVALID_CRATE,
|
||||
index: CRATE_DEF_INDEX,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,8 +119,6 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
|
|||
|
||||
fn handle_field_pattern_match(&mut self, lhs: &hir::Pat, def: Def,
|
||||
pats: &[codemap::Spanned<hir::FieldPat>]) {
|
||||
|
||||
|
||||
let variant = match self.tables.node_id_to_type(lhs.hir_id).sty {
|
||||
ty::TyAdt(adt, _) => adt.variant_of_def(def),
|
||||
_ => span_bug!(lhs.span, "non-ADT in struct pattern")
|
||||
|
|
|
@ -285,7 +285,6 @@ pub struct LocalTableInContextMut<'a, V: 'a> {
|
|||
}
|
||||
|
||||
impl<'a, V> LocalTableInContextMut<'a, V> {
|
||||
|
||||
pub fn get_mut(&mut self, id: hir::HirId) -> Option<&mut V> {
|
||||
validate_hir_id_for_typeck_tables(self.local_id_root, id, true);
|
||||
self.data.get_mut(&id.local_id)
|
||||
|
|
|
@ -449,7 +449,8 @@ impl<'a, 'tcx> GatherLoanCtxt<'a, 'tcx> {
|
|||
}
|
||||
None
|
||||
}
|
||||
LpUpvar(ty::UpvarId{ var_id: local_id, closure_expr_id: _ }) => {
|
||||
LpUpvar(ty::UpvarId{ var_id, closure_expr_id: _ }) => {
|
||||
let local_id = self.tcx().hir.def_index_to_node_id(var_id);
|
||||
self.tcx().used_mut_nodes.borrow_mut().insert(local_id);
|
||||
None
|
||||
}
|
||||
|
|
|
@ -155,12 +155,12 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults {
|
|||
let maybe_def = match expr.node {
|
||||
hir::ExprCall(ref callee, _) => {
|
||||
match callee.node {
|
||||
hir::ExprPath(ref qpath) => Some(cx.tables.qpath_def(qpath, callee.id)),
|
||||
hir::ExprPath(ref qpath) => Some(cx.tables.qpath_def(qpath, callee.hir_id)),
|
||||
_ => None
|
||||
}
|
||||
},
|
||||
hir::ExprMethodCall(..) => {
|
||||
cx.tables.type_dependent_defs.get(&expr.id).cloned()
|
||||
cx.tables.type_dependent_defs().get(expr.hir_id).cloned()
|
||||
},
|
||||
_ => { None }
|
||||
};
|
||||
|
|
|
@ -1655,10 +1655,8 @@ fn privacy_access_levels<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
|||
assert_eq!(krate, LOCAL_CRATE);
|
||||
|
||||
let krate = tcx.hir.krate();
|
||||
|
||||
let empty_tables = ty::TypeckTables::empty(None);
|
||||
|
||||
|
||||
// Check privacy of names not checked in previous compilation stages.
|
||||
let mut visitor = NamePrivacyVisitor {
|
||||
tcx: tcx,
|
||||
|
|
Loading…
Reference in a new issue