Skip to content

Commit 28d57d6

Browse files
committedDec 8, 2018
rustup rust-lang/rust#56502 ( .hir -> .hir() )
1 parent 4884c2f commit 28d57d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+140
-140
lines changed
 

‎clippy_lints/src/arithmetic.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
121121
}
122122

123123
fn check_body(&mut self, cx: &LateContext<'_, '_>, body: &hir::Body) {
124-
let body_owner = cx.tcx.hir.body_owner(body.id());
124+
let body_owner = cx.tcx.hir().body_owner(body.id());
125125

126-
match cx.tcx.hir.body_owner_kind(body_owner) {
126+
match cx.tcx.hir().body_owner_kind(body_owner) {
127127
hir::BodyOwnerKind::Static(_) | hir::BodyOwnerKind::Const => {
128-
let body_span = cx.tcx.hir.span(body_owner);
128+
let body_span = cx.tcx.hir().span(body_owner);
129129

130130
if let Some(span) = self.const_span {
131131
if span.contains(body_span) {
@@ -139,8 +139,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
139139
}
140140

141141
fn check_body_post(&mut self, cx: &LateContext<'_, '_>, body: &hir::Body) {
142-
let body_owner = cx.tcx.hir.body_owner(body.id());
143-
let body_span = cx.tcx.hir.span(body_owner);
142+
let body_owner = cx.tcx.hir().body_owner(body.id());
143+
let body_span = cx.tcx.hir().span(body_owner);
144144

145145
if let Some(span) = self.const_span {
146146
if span.contains(body_span) {

‎clippy_lints/src/assign_ops.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
144144
return; // useless if the trait doesn't exist
145145
};
146146
// check that we are not inside an `impl AssignOp` of this exact operation
147-
let parent_fn = cx.tcx.hir.get_parent(e.id);
148-
let parent_impl = cx.tcx.hir.get_parent(parent_fn);
147+
let parent_fn = cx.tcx.hir().get_parent(e.id);
148+
let parent_impl = cx.tcx.hir().get_parent(parent_fn);
149149
// the crate node is the only one that is not in the map
150150
if_chain! {
151151
if parent_impl != ast::CRATE_NODE_ID;
152-
if let hir::Node::Item(item) = cx.tcx.hir.get(parent_impl);
152+
if let hir::Node::Item(item) = cx.tcx.hir().get(parent_impl);
153153
if let hir::ItemKind::Impl(_, _, _, _, Some(ref trait_ref), _, _) =
154154
item.node;
155155
if trait_ref.path.def.def_id() == trait_id;

0 commit comments

Comments
 (0)