Change default configuration of undocumented_unsafe_blocks
This patch sets the two configuration options for `undocumented_unsafe_blocks` to `true` by default: these are `accept-comment-above-statement` and `accept-comment-above-attributes`. Having these values `false` by default prevents what many users would consider clean code, e.g. placing the `// SAFETY:` comment above a single-line functino call, rather than directly next to the argument. changelog: [`undocumented_unsafe_blocks`]: set `accept-comment-above-statement` and `accept-comment-above-attributes` to `true` by default.
This commit is contained in:
parent
f464149b8f
commit
1b3e5dd0fc
9 changed files with 159 additions and 638 deletions
|
|
@ -542,11 +542,11 @@ define_Conf! {
|
|||
/// Lint: UNDOCUMENTED_UNSAFE_BLOCKS.
|
||||
///
|
||||
/// Whether to accept a safety comment to be placed above the statement containing the `unsafe` block
|
||||
(accept_comment_above_statement: bool = false),
|
||||
(accept_comment_above_statement: bool = true),
|
||||
/// Lint: UNDOCUMENTED_UNSAFE_BLOCKS.
|
||||
///
|
||||
/// Whether to accept a safety comment to be placed above the attributes for the `unsafe` block
|
||||
(accept_comment_above_attributes: bool = false),
|
||||
(accept_comment_above_attributes: bool = true),
|
||||
/// Lint: UNNECESSARY_RAW_STRING_HASHES.
|
||||
///
|
||||
/// Whether to allow `r#""#` when `r""` can be used
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue