File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 93
93
clippy:: decimal_literal_representation,
94
94
clippy:: get_unwrap,
95
95
clippy:: indexing_slicing,
96
+ clippy:: missing_safety_doc,
96
97
clippy:: obfuscated_if_else,
97
98
clippy:: perf,
98
99
clippy:: print_stdout,
@@ -901,19 +902,15 @@ safety_comment! {
901
902
902
903
safety_comment ! {
903
904
/// SAFETY:
904
- /// The reference [1] suggests (but does not clearly promise) that
905
- /// `PhantomData` has size 0 and alignment 1.
905
+ /// For all `T`, `PhantomData<T>` has size 0 and alignment 1. [1]
906
906
/// - `FromZeroes`, `FromBytes`: There is only one possible sequence of 0
907
907
/// bytes, and `PhantomData` is inhabited.
908
908
/// - `AsBytes`: Since `PhantomData` has size 0, it contains no padding
909
909
/// bytes.
910
910
/// - `Unaligned`: Per the preceding reference, `PhantomData` has alignment
911
911
/// 1.
912
912
///
913
- /// [1] https://doc.rust-lang.org/reference/type-layout.html#the-transparent-representation
914
- ///
915
- /// TODO(https://github.com/rust-lang/rust/pull/104081): Cite guaranteed
916
- /// size and alignment.
913
+ /// [1] https://doc.rust-lang.org/std/marker/struct.PhantomData.html#layout-1
917
914
unsafe_impl!( T : ?Sized => FromZeroes for PhantomData <T >) ;
918
915
unsafe_impl!( T : ?Sized => FromBytes for PhantomData <T >) ;
919
916
unsafe_impl!( T : ?Sized => AsBytes for PhantomData <T >) ;
Original file line number Diff line number Diff line change 12
12
// our MSRV.
13
13
#![ allow( unknown_lints) ]
14
14
#![ deny( renamed_and_removed_lints) ]
15
- #![ deny( clippy:: all) ]
15
+ #![ deny( clippy:: all, clippy :: missing_safety_doc ) ]
16
16
#![ deny(
17
17
rustdoc:: bare_urls,
18
18
rustdoc:: broken_intra_doc_links,
You can’t perform that action at this time.
0 commit comments