Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Warn on clippy::as_conversions #4161

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
[build]
target-dir = "build/cargo_target"
rustflags = [
"-Wclippy::ptr_as_ptr",
"-Wclippy::as_conversions",
"-Wclippy::undocumented_unsafe_blocks",
"-Wclippy::cast_lossless",
"-Wclippy::cast_possible_truncation",
"-Wclippy::cast_possible_wrap",
"-Wclippy::cast_sign_loss",
"-Wmissing_debug_implementations",
"-Wclippy::exit",
]
Expand Down
2 changes: 1 addition & 1 deletion src/net_gen/src/if_tun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::as_conversions,
clippy::undocumented_unsafe_blocks,
missing_debug_implementations
)]
Expand Down
2 changes: 1 addition & 1 deletion src/net_gen/src/iff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::as_conversions,
clippy::undocumented_unsafe_blocks,
missing_debug_implementations
)]
Expand Down
2 changes: 1 addition & 1 deletion src/net_gen/src/sockios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::as_conversions,
clippy::undocumented_unsafe_blocks,
missing_debug_implementations
)]
Expand Down
2 changes: 1 addition & 1 deletion src/virtio_gen/src/virtio_blk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::as_conversions,
clippy::undocumented_unsafe_blocks,
missing_debug_implementations
)]
Expand Down
2 changes: 1 addition & 1 deletion src/virtio_gen/src/virtio_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::as_conversions,
clippy::undocumented_unsafe_blocks,
missing_debug_implementations
)]
Expand Down
2 changes: 1 addition & 1 deletion src/virtio_gen/src/virtio_ring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::as_conversions,
clippy::undocumented_unsafe_blocks,
missing_debug_implementations
)]
Expand Down
2 changes: 1 addition & 1 deletion src/virtio_gen/src/virtio_rng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::as_conversions,
clippy::undocumented_unsafe_blocks,
missing_debug_implementations
)]
Expand Down
2 changes: 1 addition & 1 deletion src/vmm/src/arch_gen/x86/hyperv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::as_conversions,
clippy::undocumented_unsafe_blocks,
clippy::cast_lossless
)]
Expand Down
2 changes: 1 addition & 1 deletion src/vmm/src/arch_gen/x86/hyperv_tlfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::as_conversions,
clippy::undocumented_unsafe_blocks,
clippy::cast_lossless
)]
Expand Down
5 changes: 2 additions & 3 deletions src/vmm/src/arch_gen/x86/msr_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::undocumented_unsafe_blocks,
clippy::cast_lossless
clippy::as_conversions,
clippy::undocumented_unsafe_blocks
)]

pub const MSR_EFER: u32 = 0xc0000080;
Expand Down
5 changes: 2 additions & 3 deletions src/vmm/src/arch_gen/x86/perf_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::undocumented_unsafe_blocks,
clippy::cast_lossless
clippy::as_conversions,
clippy::undocumented_unsafe_blocks
)]

pub const MSR_ARCH_PERFMON_PERFCTR0: u32 = 0xc1;
Expand Down
3 changes: 1 addition & 2 deletions tools/bindgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ function fc-bindgen {
non_upper_case_globals,
dead_code,
non_snake_case,
clippy::ptr_as_ptr,
clippy::as_conversions,
clippy::undocumented_unsafe_blocks,
clippy::cast_lossless,
missing_debug_implementations
)]

Expand Down