Skip to content

Commit

Permalink
Apply more clippy restriction lint
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 21, 2023
1 parent 65ec5fd commit b6d3a40
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 25 deletions.
24 changes: 13 additions & 11 deletions portable-atomic-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,33 @@ See [#1] for other primitives being considered for addition to this crate.
)
))]
#![warn(
missing_debug_implementations,
missing_docs,
rust_2018_idioms,
single_use_lifetimes,
unreachable_pub
)]
#![cfg_attr(not(portable_atomic_no_unsafe_op_in_unsafe_fn), warn(unsafe_op_in_unsafe_fn))] // unsafe_op_in_unsafe_fn requires Rust 1.52
#![cfg_attr(portable_atomic_no_unsafe_op_in_unsafe_fn, allow(unused_unsafe))]
#![warn(
unreachable_pub,
clippy::pedantic,
// lints for public library
// Lints that may help when writing public library.
missing_debug_implementations,
missing_docs,
clippy::alloc_instead_of_core,
clippy::exhaustive_enums,
clippy::exhaustive_structs,
clippy::impl_trait_in_params,
// clippy::missing_inline_in_public_items,
clippy::std_instead_of_alloc,
clippy::std_instead_of_core,
// lints that help writing unsafe code
// Lints that may help when writing unsafe code.
improper_ctypes,
improper_ctypes_definitions,
// unsafe_op_in_unsafe_fn, // set conditionally since it requires Rust 1.52
clippy::as_ptr_cast_mut,
clippy::default_union_representation,
clippy::inline_asm_x86_att_syntax,
clippy::trailing_empty_array,
clippy::transmute_undefined_repr,
clippy::undocumented_unsafe_blocks,
// misc
clippy::inline_asm_x86_att_syntax,
)]
#![cfg_attr(not(portable_atomic_no_unsafe_op_in_unsafe_fn), warn(unsafe_op_in_unsafe_fn))] // unsafe_op_in_unsafe_fn requires Rust 1.52
#![cfg_attr(portable_atomic_no_unsafe_op_in_unsafe_fn, allow(unused_unsafe))]
#![allow(
clippy::cast_lossless,
clippy::doc_markdown,
Expand Down
26 changes: 13 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,33 +196,33 @@ RUSTFLAGS="--cfg portable_atomic_no_outline_atomics" cargo ...
)
))]
#![warn(
improper_ctypes,
missing_debug_implementations,
missing_docs,
rust_2018_idioms,
single_use_lifetimes,
unreachable_pub
)]
#![cfg_attr(not(portable_atomic_no_unsafe_op_in_unsafe_fn), warn(unsafe_op_in_unsafe_fn))] // unsafe_op_in_unsafe_fn requires Rust 1.52
#![cfg_attr(portable_atomic_no_unsafe_op_in_unsafe_fn, allow(unused_unsafe))]
#![warn(
unreachable_pub,
clippy::pedantic,
// lints for public library
// Lints that may help when writing public library.
missing_debug_implementations,
missing_docs,
clippy::alloc_instead_of_core,
clippy::exhaustive_enums,
clippy::exhaustive_structs,
clippy::impl_trait_in_params,
clippy::missing_inline_in_public_items,
clippy::std_instead_of_alloc,
clippy::std_instead_of_core,
// lints that help writing unsafe code
// Lints that may help when writing unsafe code.
improper_ctypes,
improper_ctypes_definitions,
// unsafe_op_in_unsafe_fn, // set conditionally since it requires Rust 1.52
clippy::as_ptr_cast_mut,
clippy::default_union_representation,
clippy::inline_asm_x86_att_syntax,
clippy::trailing_empty_array,
clippy::transmute_undefined_repr,
clippy::undocumented_unsafe_blocks,
// misc
clippy::inline_asm_x86_att_syntax,
clippy::missing_inline_in_public_items,
)]
#![cfg_attr(not(portable_atomic_no_unsafe_op_in_unsafe_fn), warn(unsafe_op_in_unsafe_fn))] // unsafe_op_in_unsafe_fn requires Rust 1.52
#![cfg_attr(portable_atomic_no_unsafe_op_in_unsafe_fn, allow(unused_unsafe))]
#![allow(
clippy::cast_lossless,
clippy::doc_markdown,
Expand Down
2 changes: 1 addition & 1 deletion tools/codegen/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ pub(crate) fn gen() -> Result<()> {
src_dir.join("include"),
src_dir.join("include/sys"),
src_dir.join("lib/libpthread"),
]
];
}
fuchsia => {
header_path = src_dir.join(header.path);
Expand Down

0 comments on commit b6d3a40

Please sign in to comment.