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 @@ -975,10 +975,8 @@ declare_lint! {
975
975
/// ### Example
976
976
///
977
977
/// ```rust
978
- /// #[no_mangle]
979
- /// fn foo<T>(t: T) {
980
- ///
981
- /// }
978
+ /// #[unsafe(no_mangle)]
979
+ /// fn foo<T>(t: T) {}
982
980
/// ```
983
981
///
984
982
/// {{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 @@ -696,7 +696,7 @@ declare_lint! {
696
696
/// ### Example
697
697
///
698
698
/// ```rust
699
- /// extern "C" {
699
+ /// unsafe extern "C" {
700
700
/// static STATIC: String;
701
701
/// }
702
702
/// ```
Original file line number Diff line number Diff line change @@ -2780,7 +2780,7 @@ declare_lint! {
2780
2780
///
2781
2781
/// ```rust
2782
2782
/// enum Void {}
2783
- /// extern {
2783
+ /// unsafe extern {
2784
2784
/// static EXTERN: Void;
2785
2785
/// }
2786
2786
/// ```
@@ -4011,7 +4011,7 @@ declare_lint! {
4011
4011
/// ```rust
4012
4012
/// #![warn(ffi_unwind_calls)]
4013
4013
///
4014
- /// extern "C-unwind" {
4014
+ /// unsafe extern "C-unwind" {
4015
4015
/// fn foo();
4016
4016
/// }
4017
4017
///
@@ -4755,7 +4755,7 @@ declare_lint! {
4755
4755
///
4756
4756
/// ### Example
4757
4757
///
4758
- /// ```rust
4758
+ /// ```rust,edition2021
4759
4759
/// #![warn(missing_unsafe_on_extern)]
4760
4760
/// #![allow(dead_code)]
4761
4761
///
@@ -4792,7 +4792,7 @@ declare_lint! {
4792
4792
///
4793
4793
/// ### Example
4794
4794
///
4795
- /// ```rust
4795
+ /// ```rust,edition2021
4796
4796
/// #![warn(unsafe_attr_outside_unsafe)]
4797
4797
///
4798
4798
/// #[no_mangle]
You can’t perform that action at this time.
0 commit comments