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 @@ -998,10 +998,8 @@ declare_lint! {
998998 /// ### Example
999999 ///
10001000 /// ```rust
1001- /// #[no_mangle]
1002- /// fn foo<T>(t: T) {
1003- ///
1004- /// }
1001+ /// #[unsafe(no_mangle)]
1002+ /// fn foo<T>(t: T) {}
10051003 /// ```
10061004 ///
10071005 /// {{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 @@ -527,7 +527,7 @@ declare_lint! {
527527 /// ### Example
528528 ///
529529 /// ```rust
530- /// extern "C" {
530+ /// unsafe extern "C" {
531531 /// static STATIC: String;
532532 /// }
533533 /// ```
Original file line number Diff line number Diff line change @@ -2829,7 +2829,7 @@ declare_lint! {
28292829 ///
28302830 /// ```rust
28312831 /// enum Void {}
2832- /// extern {
2832+ /// unsafe extern {
28332833 /// static EXTERN: Void;
28342834 /// }
28352835 /// ```
@@ -4095,7 +4095,7 @@ declare_lint! {
40954095 /// ```rust
40964096 /// #![warn(ffi_unwind_calls)]
40974097 ///
4098- /// extern "C-unwind" {
4098+ /// unsafe extern "C-unwind" {
40994099 /// fn foo();
41004100 /// }
41014101 ///
@@ -4836,7 +4836,7 @@ declare_lint! {
48364836 ///
48374837 /// ### Example
48384838 ///
4839- /// ```rust
4839+ /// ```rust,edition2021
48404840 /// #![warn(missing_unsafe_on_extern)]
48414841 /// #![allow(dead_code)]
48424842 ///
@@ -4873,7 +4873,7 @@ declare_lint! {
48734873 ///
48744874 /// ### Example
48754875 ///
4876- /// ```rust
4876+ /// ```rust,edition2021
48774877 /// #![warn(unsafe_attr_outside_unsafe)]
48784878 ///
48794879 /// #[no_mangle]
You can’t perform that action at this time.
0 commit comments