Skip to content

Commit e3c15ae

Browse files
committed
update comment
1 parent 7bd8ce2 commit e3c15ae

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/librustc/hir/map/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -542,11 +542,7 @@ impl<'hir> Map<'hir> {
542542
/// Retrieves the `Node` corresponding to `id`, returning `None` if cannot be found.
543543
pub fn find(&self, hir_id: HirId) -> Option<Node<'hir>> {
544544
let node = self.get_entry(hir_id).node;
545-
if let Node::Crate(..) = node {
546-
None
547-
} else {
548-
Some(node)
549-
}
545+
if let Node::Crate(..) = node { None } else { Some(node) }
550546
}
551547

552548
/// Similar to `get_parent`; returns the parent HIR Id, or just `hir_id` if there

src/librustc_hir/hir.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ pub enum ImplItemKind<'hir> {
19011901
/// An associated constant of the given type, set to the constant result
19021902
/// of the expression.
19031903
Const(&'hir Ty<'hir>, BodyId),
1904-
/// A method implementation with the given signature and body.
1904+
/// An associated function implementation with the given signature and body.
19051905
Fn(FnSig<'hir>, BodyId),
19061906
/// An associated type.
19071907
TyAlias(&'hir Ty<'hir>),

0 commit comments

Comments
 (0)