Skip to content

Commit 8d5ca62

Browse files
committed
Fix some comments
1 parent 78b54c0 commit 8d5ca62

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/librustc/hir/map/mod.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl<'ast> Map<'ast> {
266266

267267
if let Some(last_id) = last_expr {
268268
// The body of the item may have a separate dep node
269-
// (Note that impl/trait items don't currently have
269+
// (Note that trait items don't currently have
270270
// their own dep node, so there's also just one
271271
// HirBody node for all the items)
272272
if self.is_body(last_id, item) {
@@ -282,9 +282,6 @@ impl<'ast> Map<'ast> {
282282

283283
if let Some(last_id) = last_expr {
284284
// The body of the item may have a separate dep node
285-
// (Note that impl/trait items don't currently have
286-
// their own dep node, so there's also just one
287-
// HirBody node for all the items)
288285
if self.is_impl_item_body(last_id, item) {
289286
return DepNode::HirBody(def_id);
290287
}
@@ -373,9 +370,9 @@ impl<'ast> Map<'ast> {
373370
fn is_body(&self, node_id: NodeId, item: &Item) -> bool {
374371
match item.node {
375372
ItemFn(_, _, _, _, _, body) => body.node_id() == node_id,
376-
// Since trait/impl items currently don't get their own dep nodes,
373+
// Since trait items currently don't get their own dep nodes,
377374
// we check here whether node_id is the body of any of the items.
378-
// Once they get their own dep nodes, this can go away
375+
// If they get their own dep nodes, this can go away
379376
ItemTrait(_, _, _, ref trait_items) => {
380377
trait_items.iter().any(|trait_item| { match trait_item.node {
381378
MethodTraitItem(_, Some(body)) => body.node_id() == node_id,

0 commit comments

Comments
 (0)