Skip to content

Commit

Permalink
Merge pull request #599 from icedland/fixes-2024-08-16
Browse files Browse the repository at this point in the history
Update deps, fix rustfmt #[cfg] warnings
  • Loading branch information
wtfsck authored Aug 16, 2024
2 parents 2fc2153 + 728079f commit ab80255
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 3 deletions.
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

0 comments on commit ab80255

Please sign in to comment.