This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -975,10 +975,8 @@ declare_lint! {
975975 /// ### Example
976976 ///
977977 /// ```rust
978- /// #[no_mangle]
979- /// fn foo<T>(t: T) {
980- ///
981- /// }
978+ /// #[unsafe(no_mangle)]
979+ /// fn foo<T>(t: T) {}
982980 /// ```
983981 ///
984982 /// {{produces}}
Original file line number Diff line number Diff line change @@ -35,12 +35,12 @@ declare_lint! {
3535 ///
3636 /// ```rust
3737 /// mod m {
38- /// extern "C" {
38+ /// unsafe extern "C" {
3939 /// fn foo();
4040 /// }
4141 /// }
4242 ///
43- /// extern "C" {
43+ /// unsafe extern "C" {
4444 /// fn foo(_: u32);
4545 /// }
4646 /// ```
Original file line number Diff line number Diff line change @@ -696,7 +696,7 @@ declare_lint! {
696696 /// ### Example
697697 ///
698698 /// ```rust
699- /// extern "C" {
699+ /// unsafe extern "C" {
700700 /// static STATIC: String;
701701 /// }
702702 /// ```
Original file line number Diff line number Diff line change @@ -2780,7 +2780,7 @@ declare_lint! {
27802780 ///
27812781 /// ```rust
27822782 /// enum Void {}
2783- /// extern {
2783+ /// unsafe extern {
27842784 /// static EXTERN: Void;
27852785 /// }
27862786 /// ```
@@ -4011,7 +4011,7 @@ declare_lint! {
40114011 /// ```rust
40124012 /// #![warn(ffi_unwind_calls)]
40134013 ///
4014- /// extern "C-unwind" {
4014+ /// unsafe extern "C-unwind" {
40154015 /// fn foo();
40164016 /// }
40174017 ///
@@ -4755,7 +4755,7 @@ declare_lint! {
47554755 ///
47564756 /// ### Example
47574757 ///
4758- /// ```rust
4758+ /// ```rust,edition2021
47594759 /// #![warn(missing_unsafe_on_extern)]
47604760 /// #![allow(dead_code)]
47614761 ///
@@ -4792,7 +4792,7 @@ declare_lint! {
47924792 ///
47934793 /// ### Example
47944794 ///
4795- /// ```rust
4795+ /// ```rust,edition2021
47964796 /// #![warn(unsafe_attr_outside_unsafe)]
47974797 ///
47984798 /// #[no_mangle]
You can’t perform that action at this time.
0 commit comments