Skip to content

Commit

Permalink
Fix builtin lints
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Sep 18, 2024
1 parent e1aeb45 commit 00e426a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
6 changes: 2 additions & 4 deletions compiler/rustc_lint/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -998,10 +998,8 @@ declare_lint! {
/// ### Example
///
/// ```rust
/// #[no_mangle]
/// fn foo<T>(t: T) {
///
/// }
/// #[unsafe(no_mangle)]
/// fn foo<T>(t: T) {}
/// ```
///
/// {{produces}}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_lint/src/foreign_modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ declare_lint! {
///
/// ```rust
/// mod m {
/// extern "C" {
/// unsafe extern "C" {
/// fn foo();
/// }
/// }
///
/// extern "C" {
/// unsafe extern "C" {
/// fn foo(_: u32);
/// }
/// ```
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ declare_lint! {
/// ### Example
///
/// ```rust
/// extern "C" {
/// unsafe extern "C" {
/// static STATIC: String;
/// }
/// ```
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2881,7 +2881,7 @@ declare_lint! {
///
/// ```rust
/// enum Void {}
/// extern {
/// unsafe extern {
/// static EXTERN: Void;
/// }
/// ```
Expand Down Expand Up @@ -4147,7 +4147,7 @@ declare_lint! {
/// ```rust
/// #![warn(ffi_unwind_calls)]
///
/// extern "C-unwind" {
/// unsafe extern "C-unwind" {
/// fn foo();
/// }
///
Expand Down Expand Up @@ -4888,7 +4888,7 @@ declare_lint! {
///
/// ### Example
///
/// ```rust
/// ```rust,edition2021
/// #![warn(missing_unsafe_on_extern)]
/// #![allow(dead_code)]
///
Expand Down Expand Up @@ -4925,7 +4925,7 @@ declare_lint! {
///
/// ### Example
///
/// ```rust
/// ```rust,edition2021
/// #![warn(unsafe_attr_outside_unsafe)]
///
/// #[no_mangle]
Expand Down

0 comments on commit 00e426a

Please sign in to comment.