Fix builtin lints

This commit is contained in:
Michael Goulet 2024-09-18 15:39:23 -04:00
parent 76d341fa09
commit 7f6873f64c
4 changed files with 9 additions and 11 deletions

View file

@ -975,10 +975,8 @@ declare_lint! {
/// ### Example
///
/// ```rust
/// #[no_mangle]
/// fn foo<T>(t: T) {
///
/// }
/// #[unsafe(no_mangle)]
/// fn foo<T>(t: T) {}
/// ```
///
/// {{produces}}

View file

@ -35,12 +35,12 @@ declare_lint! {
///
/// ```rust
/// mod m {
/// extern "C" {
/// unsafe extern "C" {
/// fn foo();
/// }
/// }
///
/// extern "C" {
/// unsafe extern "C" {
/// fn foo(_: u32);
/// }
/// ```

View file

@ -696,7 +696,7 @@ declare_lint! {
/// ### Example
///
/// ```rust
/// extern "C" {
/// unsafe extern "C" {
/// static STATIC: String;
/// }
/// ```

View file

@ -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]