From c2bd2a45d4835c23d4f1db3c49f80c9f8f36e4e9 Mon Sep 17 00:00:00 2001 From: wtfsck Date: Fri, 5 Feb 2021 23:28:40 +0100 Subject: [PATCH] Change MSRV to 1.42.0 --- build/README.md | 2 +- build/build-rust | 2 +- build/ci-install-rust.sh | 2 +- src/rust/iced-x86-js/README.md | 2 +- src/rust/iced-x86/README.md | 6 +++--- src/rust/iced-x86/src/iced_error.rs | 8 +------- src/rust/iced-x86/src/lib.rs | 8 ++++---- 7 files changed, 12 insertions(+), 18 deletions(-) diff --git a/build/README.md b/build/README.md index fd1fd298a..977a4139b 100644 --- a/build/README.md +++ b/build/README.md @@ -17,7 +17,7 @@ Building and testing the Rust code requires: - `rustup update` - `rustup component add rustfmt clippy` - `rustup target add wasm32-unknown-unknown` - - MSRV: `rustup toolchain install 1.41.0` + - MSRV: `rustup toolchain install 1.42.0` - Pass `--no-msrv` to `build-rust` if you don't want to install it - .NET SDK (latest version): https://dotnet.microsoft.com/download - required to generate and test valid/invalid instructions (pass `--no-dotnet` to `build-rust` if you don't want to install .NET) diff --git a/build/build-rust b/build/build-rust index ae6118107..bbe6f2131 100755 --- a/build/build-rust +++ b/build/build-rust @@ -16,7 +16,7 @@ has_msrv=y set_rustflags=y # Minimum supported Rust version -msrv="1.41.0" +msrv="1.42.0" new_func() { echo diff --git a/build/ci-install-rust.sh b/build/ci-install-rust.sh index 277841a4c..9a479b612 100644 --- a/build/ci-install-rust.sh +++ b/build/ci-install-rust.sh @@ -16,7 +16,7 @@ if [[ "$OSTYPE" = "darwin"* ]]; then fi # It fails on Windows so disable auto self update -rustup toolchain install 1.41.0 --no-self-update +rustup toolchain install 1.42.0 --no-self-update rustup target add wasm32-unknown-unknown rustup update --no-self-update diff --git a/src/rust/iced-x86-js/README.md b/src/rust/iced-x86-js/README.md index 1d291577a..b1ace8408 100644 --- a/src/rust/iced-x86-js/README.md +++ b/src/rust/iced-x86-js/README.md @@ -1,4 +1,4 @@ -iced-x86 JavaScript bindings (Rust -> WebAssembly) [![npm](https://img.shields.io/npm/v/iced-x86.svg)](https://www.npmjs.com/package/iced-x86) [![GitHub builds](https://github.com/icedland/iced/workflows/GitHub%20CI/badge.svg)](https://github.com/icedland/iced/actions) ![Minimum rustc version](https://img.shields.io/badge/rustc-1.41.0+-yellow.svg) ![License](https://img.shields.io/crates/l/iced-x86.svg) +iced-x86 JavaScript bindings (Rust -> WebAssembly) [![npm](https://img.shields.io/npm/v/iced-x86.svg)](https://www.npmjs.com/package/iced-x86) [![GitHub builds](https://github.com/icedland/iced/workflows/GitHub%20CI/badge.svg)](https://github.com/icedland/iced/actions) ![Minimum rustc version](https://img.shields.io/badge/rustc-1.42.0+-yellow.svg) ![License](https://img.shields.io/crates/l/iced-x86.svg) iced-x86 is a high performance and correct x86 (16/32/64-bit) disassembler for JavaScript (WebAssembly). diff --git a/src/rust/iced-x86/README.md b/src/rust/iced-x86/README.md index fbe60c4f0..3209c1cf3 100644 --- a/src/rust/iced-x86/README.md +++ b/src/rust/iced-x86/README.md @@ -1,7 +1,7 @@ iced-x86 [![Latest version](https://img.shields.io/crates/v/iced-x86.svg)](https://crates.io/crates/iced-x86) [![Documentation](https://docs.rs/iced-x86/badge.svg)](https://docs.rs/iced-x86) -[![Minimum rustc version](https://img.shields.io/badge/rustc-1.41.0+-yellow.svg)](#minimum-supported-rustc-version) +[![Minimum rustc version](https://img.shields.io/badge/rustc-1.42.0+-yellow.svg)](#minimum-supported-rustc-version) ![License](https://img.shields.io/crates/l/iced-x86.svg) iced-x86 is a high performance and correct x86 (16/32/64-bit) instruction decoder, disassembler and assembler written in Rust. @@ -17,7 +17,7 @@ It can be used for static analysis of x86/x64 binaries, to rewrite code (eg. rem - ✔️The encoder can be used to re-encode decoded instructions at any address - ✔️API to get instruction info, eg. read/written registers, memory and rflags bits; CPUID feature flag, control flow info, etc - ✔️Supports `#![no_std]` and `WebAssembly` -- ✔️Supports `rustc` `1.41.0` or later +- ✔️Supports `rustc` `1.42.0` or later - ✔️Few dependencies (`static_assertions` and `lazy_static`) - ✔️License: MIT @@ -1131,7 +1131,7 @@ pub(crate) fn how_to_disassemble_old_instrs() { ## Minimum supported `rustc` version -iced-x86 supports `rustc` `1.41.0` or later. +iced-x86 supports `rustc` `1.42.0` or later. This is checked in CI builds where the minimum supported version and the latest stable version are used to build the source code and run tests. Bumping the minimum supported version of `rustc` is considered a minor breaking change. The minor version of iced-x86 will be incremented. diff --git a/src/rust/iced-x86/src/iced_error.rs b/src/rust/iced-x86/src/iced_error.rs index 95c6cfd7d..c1c3af29c 100644 --- a/src/rust/iced-x86/src/iced_error.rs +++ b/src/rust/iced-x86/src/iced_error.rs @@ -27,13 +27,7 @@ impl IcedError { } #[cfg(feature = "std")] -impl Error for IcedError { - // Required since MSRV < 1.42.0 - #[allow(clippy::missing_inline_in_public_items)] - fn description(&self) -> &str { - &self.error - } -} +impl Error for IcedError {} impl fmt::Display for IcedError { #[allow(clippy::missing_inline_in_public_items)] diff --git a/src/rust/iced-x86/src/lib.rs b/src/rust/iced-x86/src/lib.rs index 3c3e22f75..9591c9f20 100644 --- a/src/rust/iced-x86/src/lib.rs +++ b/src/rust/iced-x86/src/lib.rs @@ -5,7 +5,7 @@ //! iced-x86 //! [![Latest version](https://img.shields.io/crates/v/iced-x86.svg)](https://crates.io/crates/iced-x86) //! [![Documentation](https://docs.rs/iced-x86/badge.svg)](https://docs.rs/iced-x86) -//! [![Minimum rustc version](https://img.shields.io/badge/rustc-1.41.0+-yellow.svg)](#minimum-supported-rustc-version) +//! [![Minimum rustc version](https://img.shields.io/badge/rustc-1.42.0+-yellow.svg)](#minimum-supported-rustc-version) //! ![License](https://img.shields.io/crates/l/iced-x86.svg) //! //! iced-x86 is a high performance and correct x86 (16/32/64-bit) instruction decoder, disassembler and assembler written in Rust. @@ -21,7 +21,7 @@ //! - ✔️The encoder can be used to re-encode decoded instructions at any address //! - ✔️API to get instruction info, eg. read/written registers, memory and rflags bits; CPUID feature flag, control flow info, etc //! - ✔️Supports `#![no_std]` and `WebAssembly` -//! - ✔️Supports `rustc` `1.41.0` or later +//! - ✔️Supports `rustc` `1.42.0` or later //! - ✔️Few dependencies (`static_assertions` and `lazy_static`) //! - ✔️License: MIT //! @@ -1135,7 +1135,7 @@ //! //! ## Minimum supported `rustc` version //! -//! iced-x86 supports `rustc` `1.41.0` or later. +//! iced-x86 supports `rustc` `1.42.0` or later. //! This is checked in CI builds where the minimum supported version and the latest stable version are used to build the source code and run tests. //! //! Bumping the minimum supported version of `rustc` is considered a minor breaking change. The minor version of iced-x86 will be incremented. @@ -1166,7 +1166,7 @@ #![allow(clippy::field_reassign_with_default)] #![allow(clippy::manual_range_contains)] #![allow(clippy::manual_strip)] // Not supported if < 1.45.0 -#![allow(clippy::match_like_matches_macro)] // Not supported if < 1.42.0 +#![allow(clippy::match_like_matches_macro)] #![allow(clippy::match_ref_pats)] #![allow(clippy::ptr_eq)] #![allow(clippy::too_many_arguments)]