Auto merge of #7852 - surechen:fix_typo, r=xFrednet

Fix typo for invalid_null_ptr_usage and missing_inline_in_public_items.

Fix typo for invalid_null_ptr_usage and missing_inline_in_public_items.

changelog: none
This commit is contained in:
bors 2021-10-21 09:08:22 +00:00
commit 535262cc8c
2 changed files with 2 additions and 1 deletions

View file

@ -8,7 +8,7 @@ use rustc_span::sym;
declare_clippy_lint! {
/// ### What it does
/// it lints if an exported function, method, trait method with default impl,
/// It lints if an exported function, method, trait method with default impl,
/// or trait method impl is not `#[inline]`.
///
/// ### Why is this bad?

View file

@ -139,6 +139,7 @@ declare_clippy_lint! {
/// unsafe { std::slice::from_raw_parts(ptr::null(), 0); }
/// ```
///
/// ```ignore
/// // Good
/// unsafe { std::slice::from_raw_parts(NonNull::dangling().as_ptr(), 0); }
/// ```