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

Update deps, fix rustfmt #[cfg] warnings #599

Merged
merged 2 commits into from
Aug 16, 2024
Merged
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: 3 additions & 3 deletions src/java/iced-x86/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.3</version>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.10.3</version>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -151,7 +151,7 @@
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.4</version>
<version>3.2.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
1 change: 1 addition & 0 deletions src/rust/iced-x86/src/block_enc/instr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ impl InstrUtils {
format!("{} : 0x{:X}", error_message, instruction.ip())
}

#[allow(unexpected_cfgs)]
pub(super) fn create(block_encoder: &mut BlockEncInt, base: &mut InstrBase, instruction: &Instruction) -> Box<dyn Instr> {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
match instruction.code() {
Expand Down
4 changes: 4 additions & 0 deletions src/rust/iced-x86/src/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44853,6 +44853,7 @@ impl Code {
#[must_use]
#[inline]
#[allow(clippy::match_like_matches_macro)]
#[allow(unexpected_cfgs)]
pub const fn is_string_instruction(self) -> bool {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
match self {
Expand Down Expand Up @@ -45083,6 +45084,7 @@ impl Code {
impl Code {
#[must_use]
#[allow(clippy::match_like_matches_macro)]
#[allow(unexpected_cfgs)]
pub(crate) const fn ignores_segment(self) -> bool {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
match self {
Expand All @@ -45108,6 +45110,7 @@ impl Code {
#[must_use]
#[inline]
#[allow(clippy::match_like_matches_macro)]
#[allow(unexpected_cfgs)]
pub(crate) const fn ignores_index(self) -> bool {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
match self {
Expand All @@ -45123,6 +45126,7 @@ impl Code {

#[must_use]
#[inline]
#[allow(unexpected_cfgs)]
pub(crate) const fn is_tile_stride_index(self) -> bool {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
match self {
Expand Down
1 change: 1 addition & 0 deletions src/rust/iced-x86/src/encoder/instruction_fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ impl<'a, 'b> InstructionFormatter<'a, 'b> {
}
}

#[allow(unexpected_cfgs)]
pub(super) fn format(&mut self) -> String {
if !self.op_code.is_instruction() {
match self.op_code.code() {
Expand Down
2 changes: 2 additions & 0 deletions src/rust/iced-x86/src/encoder/op_code_fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ impl<'a, 'b> OpCodeFormatter<'a, 'b> {
EncodingKind::EVEX | EncodingKind::XOP | EncodingKind::D3NOW | EncodingKind::MVEX => return true,
}

#[allow(unexpected_cfgs)]
for &op_kind in self.op_code.op_kinds() {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
match op_kind {
Expand Down Expand Up @@ -205,6 +206,7 @@ impl<'a, 'b> OpCodeFormatter<'a, 'b> {
false
}

#[allow(unexpected_cfgs)]
fn has_vsib(&self) -> bool {
for &op_kind in self.op_code.op_kinds() {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
Expand Down
1 change: 1 addition & 0 deletions src/rust/iced-x86/src/encoder/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ fn encode_invalid_code_value_is_an_error() {
}

#[test]
#[allow(unexpected_cfgs)]
fn displsize_eq_1_uses_long_form_if_it_does_not_fit_in_1_byte() {
const RIP: u64 = 0;

Expand Down
1 change: 1 addition & 0 deletions src/rust/iced-x86/src/formatter/fmt_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ pub(super) fn is_call(kind: FormatterFlowControl) -> bool {
}

#[must_use]
#[allow(unexpected_cfgs)]
pub(super) fn get_flow_control(instruction: &Instruction) -> FormatterFlowControl {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
match instruction.code() {
Expand Down
3 changes: 3 additions & 0 deletions src/rust/iced-x86/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2447,6 +2447,7 @@ impl Instruction {
#[must_use]
#[allow(clippy::missing_inline_in_public_items)]
#[allow(clippy::match_single_binding)]
#[allow(unexpected_cfgs)]
pub const fn vsib(&self) -> Option<bool> {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
match self.code() {
Expand Down Expand Up @@ -2829,6 +2830,7 @@ impl Instruction {
/// ```
#[must_use]
#[allow(clippy::missing_inline_in_public_items)]
#[allow(unexpected_cfgs)]
pub fn stack_pointer_increment(&self) -> i32 {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
#[allow(clippy::match_single_binding)]
Expand Down Expand Up @@ -2948,6 +2950,7 @@ impl Instruction {
/// ```
#[must_use]
#[allow(clippy::missing_inline_in_public_items)]
#[allow(unexpected_cfgs)]
pub fn fpu_stack_increment_info(&self) -> FpuStackIncrementInfo {
#[cfg_attr(feature = "cargo-fmt", rustfmt::skip)]
#[allow(clippy::match_single_binding)]
Expand Down