Fix builtin lints
This commit is contained in:
parent
76d341fa09
commit
7f6873f64c
4 changed files with 9 additions and 11 deletions
|
@ -975,10 +975,8 @@ declare_lint! {
|
|||
/// ### Example
|
||||
///
|
||||
/// ```rust
|
||||
/// #[no_mangle]
|
||||
/// fn foo<T>(t: T) {
|
||||
///
|
||||
/// }
|
||||
/// #[unsafe(no_mangle)]
|
||||
/// fn foo<T>(t: T) {}
|
||||
/// ```
|
||||
///
|
||||
/// {{produces}}
|
||||
|
|
|
@ -35,12 +35,12 @@ declare_lint! {
|
|||
///
|
||||
/// ```rust
|
||||
/// mod m {
|
||||
/// extern "C" {
|
||||
/// unsafe extern "C" {
|
||||
/// fn foo();
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// extern "C" {
|
||||
/// unsafe extern "C" {
|
||||
/// fn foo(_: u32);
|
||||
/// }
|
||||
/// ```
|
||||
|
|
|
@ -696,7 +696,7 @@ declare_lint! {
|
|||
/// ### Example
|
||||
///
|
||||
/// ```rust
|
||||
/// extern "C" {
|
||||
/// unsafe extern "C" {
|
||||
/// static STATIC: String;
|
||||
/// }
|
||||
/// ```
|
||||
|
|
|
@ -2780,7 +2780,7 @@ declare_lint! {
|
|||
///
|
||||
/// ```rust
|
||||
/// enum Void {}
|
||||
/// extern {
|
||||
/// unsafe extern {
|
||||
/// static EXTERN: Void;
|
||||
/// }
|
||||
/// ```
|
||||
|
@ -4011,7 +4011,7 @@ declare_lint! {
|
|||
/// ```rust
|
||||
/// #![warn(ffi_unwind_calls)]
|
||||
///
|
||||
/// extern "C-unwind" {
|
||||
/// unsafe extern "C-unwind" {
|
||||
/// fn foo();
|
||||
/// }
|
||||
///
|
||||
|
@ -4755,7 +4755,7 @@ declare_lint! {
|
|||
///
|
||||
/// ### Example
|
||||
///
|
||||
/// ```rust
|
||||
/// ```rust,edition2021
|
||||
/// #![warn(missing_unsafe_on_extern)]
|
||||
/// #![allow(dead_code)]
|
||||
///
|
||||
|
@ -4792,7 +4792,7 @@ declare_lint! {
|
|||
///
|
||||
/// ### Example
|
||||
///
|
||||
/// ```rust
|
||||
/// ```rust,edition2021
|
||||
/// #![warn(unsafe_attr_outside_unsafe)]
|
||||
///
|
||||
/// #[no_mangle]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue