Addressing reviewer comments

This commit is contained in:
Renato Lochetti 2023-06-05 08:55:39 +01:00
parent 520228b377
commit e2e6a02445
No known key found for this signature in database
GPG key ID: FB2DDFF8C164FA5E
6 changed files with 52 additions and 5 deletions

View file

@ -580,7 +580,14 @@ fn get_body_search_span(cx: &LateContext<'_>) -> Option<Span> {
for (_, node) in map.parent_iter(body.hir_id) {
match node {
Node::Expr(e) => span = e.span,
Node::Block(_) | Node::Arm(_) | Node::Stmt(_) | Node::Local(_) => (),
Node::Block(_)
| Node::Arm(_)
| Node::Stmt(_)
| Node::Local(_)
| Node::Item(hir::Item {
kind: hir::ItemKind::Const(..) | ItemKind::Static(..),
..
}) => (),
_ => break,
}
}

View file

@ -540,7 +540,7 @@ define_Conf! {
(min_ident_chars_threshold: u64 = 1),
/// Lint: UNDOCUMENTED_UNSAFE_BLOCKS.
///
/// Whether to accept a safety comment to be placed above the statement containing the `usafe` block
/// Whether to accept a safety comment to be placed above the statement containing the `unsafe` block
(accept_comment_above_statement: bool = false),
}