Commit d22fb9a 1 parent 93ea92c commit d22fb9a Copy full SHA for d22fb9a
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 @@ -527,7 +527,7 @@ declare_lint! {
527
527
/// ### Example
528
528
///
529
529
/// ```rust
530
- /// extern "C" {
530
+ /// unsafe extern "C" {
531
531
/// static STATIC: String;
532
532
/// }
533
533
/// ```
Original file line number Diff line number Diff line change @@ -2829,7 +2829,7 @@ declare_lint! {
2829
2829
///
2830
2830
/// ```rust
2831
2831
/// enum Void {}
2832
- /// extern {
2832
+ /// unsafe extern {
2833
2833
/// static EXTERN: Void;
2834
2834
/// }
2835
2835
/// ```
@@ -4095,7 +4095,7 @@ declare_lint! {
4095
4095
/// ```rust
4096
4096
/// #![warn(ffi_unwind_calls)]
4097
4097
///
4098
- /// extern "C-unwind" {
4098
+ /// unsafe extern "C-unwind" {
4099
4099
/// fn foo();
4100
4100
/// }
4101
4101
///
@@ -4836,7 +4836,7 @@ declare_lint! {
4836
4836
///
4837
4837
/// ### Example
4838
4838
///
4839
- /// ```rust
4839
+ /// ```rust,edition2021
4840
4840
/// #![warn(missing_unsafe_on_extern)]
4841
4841
/// #![allow(dead_code)]
4842
4842
///
@@ -4873,7 +4873,7 @@ declare_lint! {
4873
4873
///
4874
4874
/// ### Example
4875
4875
///
4876
- /// ```rust
4876
+ /// ```rust,edition2021
4877
4877
/// #![warn(unsafe_attr_outside_unsafe)]
4878
4878
///
4879
4879
/// #[no_mangle]
You can’t perform that action at this time.
0 commit comments