File tree 4 files changed +9
-11
lines changed
4 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -998,10 +998,8 @@ declare_lint! {
998
998
/// ### Example
999
999
///
1000
1000
/// ```rust
1001
- /// #[no_mangle]
1002
- /// fn foo<T>(t: T) {
1003
- ///
1004
- /// }
1001
+ /// #[unsafe(no_mangle)]
1002
+ /// fn foo<T>(t: T) {}
1005
1003
/// ```
1006
1004
///
1007
1005
/// {{produces}}
Original file line number Diff line number Diff line change @@ -35,12 +35,12 @@ declare_lint! {
35
35
///
36
36
/// ```rust
37
37
/// mod m {
38
- /// extern "C" {
38
+ /// unsafe extern "C" {
39
39
/// fn foo();
40
40
/// }
41
41
/// }
42
42
///
43
- /// extern "C" {
43
+ /// unsafe extern "C" {
44
44
/// fn foo(_: u32);
45
45
/// }
46
46
/// ```
Original file line number Diff line number Diff line change @@ -923,7 +923,7 @@ declare_lint! {
923
923
/// ### Example
924
924
///
925
925
/// ```rust
926
- /// extern "C" {
926
+ /// unsafe extern "C" {
927
927
/// static STATIC: String;
928
928
/// }
929
929
/// ```
Original file line number Diff line number Diff line change @@ -2881,7 +2881,7 @@ declare_lint! {
2881
2881
///
2882
2882
/// ```rust
2883
2883
/// enum Void {}
2884
- /// extern {
2884
+ /// unsafe extern {
2885
2885
/// static EXTERN: Void;
2886
2886
/// }
2887
2887
/// ```
@@ -4147,7 +4147,7 @@ declare_lint! {
4147
4147
/// ```rust
4148
4148
/// #![warn(ffi_unwind_calls)]
4149
4149
///
4150
- /// extern "C-unwind" {
4150
+ /// unsafe extern "C-unwind" {
4151
4151
/// fn foo();
4152
4152
/// }
4153
4153
///
@@ -4888,7 +4888,7 @@ declare_lint! {
4888
4888
///
4889
4889
/// ### Example
4890
4890
///
4891
- /// ```rust
4891
+ /// ```rust,edition2021
4892
4892
/// #![warn(missing_unsafe_on_extern)]
4893
4893
/// #![allow(dead_code)]
4894
4894
///
@@ -4925,7 +4925,7 @@ declare_lint! {
4925
4925
///
4926
4926
/// ### Example
4927
4927
///
4928
- /// ```rust
4928
+ /// ```rust,edition2021
4929
4929
/// #![warn(unsafe_attr_outside_unsafe)]
4930
4930
///
4931
4931
/// #[no_mangle]
You can’t perform that action at this time.
0 commit comments