From ab6358e7175c4c601f369154d48723588bb17a0a Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Wed, 25 Mar 2026 14:09:54 +0100 Subject: [PATCH] Update MSRV to 1.92 --- .github/workflows/rust.yml | 58 +++++++++++++++++++------------------- Cargo.toml | 44 ++++++++++++++++++++--------- rust-toolchain | 2 +- 3 files changed, 60 insertions(+), 44 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fc6d0ded..48da543c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -94,7 +94,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.88.0 + toolchain: 1.92.0 target: wasm32-unknown-unknown override: true - name: Download and install Trunk binary @@ -108,38 +108,38 @@ jobs: fail-fast: false matrix: include: - - os: macos-latest - TARGET: aarch64-apple-darwin + - os: macos-latest + TARGET: aarch64-apple-darwin - - os: macos-latest - TARGET: x86_64-apple-darwin + - os: macos-latest + TARGET: x86_64-apple-darwin - - os: ubuntu-latest - TARGET: arm-unknown-linux-musleabihf + - os: ubuntu-latest + TARGET: arm-unknown-linux-musleabihf - - os: ubuntu-latest - TARGET: armv7-unknown-linux-musleabihf + - os: ubuntu-latest + TARGET: armv7-unknown-linux-musleabihf - - os: ubuntu-latest - TARGET: x86_64-unknown-linux-musl + - os: ubuntu-latest + TARGET: x86_64-unknown-linux-musl - - os: windows-latest - TARGET: x86_64-pc-windows-msvc - EXTENSION: .exe + - os: windows-latest + TARGET: x86_64-pc-windows-msvc + EXTENSION: .exe steps: - - name: Building ${{ matrix.TARGET }} - run: echo "${{ matrix.TARGET }}" - - - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1.0.1 - with: - toolchain: stable - target: ${{ matrix.TARGET }} - override: true - - - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - args: --verbose --release --target=${{ matrix.TARGET }} + - name: Building ${{ matrix.TARGET }} + run: echo "${{ matrix.TARGET }}" + + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1.0.1 + with: + toolchain: stable + target: ${{ matrix.TARGET }} + override: true + + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: build + args: --verbose --release --target=${{ matrix.TARGET }} diff --git a/Cargo.toml b/Cargo.toml index 0874c2c8..38560dc0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,9 @@ name = "eframe_template" version = "0.1.0" authors = ["Emil Ernerfeldt "] edition = "2024" +license = "MIT OR Apache-2.0" include = ["LICENSE-APACHE", "LICENSE-MIT", "**/*.rs", "Cargo.toml"] -rust-version = "1.88" +rust-version = "1.92" [package.metadata.docs.rs] all-features = true @@ -69,7 +70,8 @@ rust_2018_idioms = { level = "warn", priority = -1 } rust_2021_prelude_collisions = "warn" semicolon_in_expressions_from_macros = "warn" trivial_numeric_casts = "warn" -unsafe_op_in_unsafe_fn = "warn" # `unsafe_op_in_unsafe_fn` may become the default in future Rust versions: https://github.com/rust-lang/rust/issues/71668 +unexpected_cfgs = "warn" +unsafe_op_in_unsafe_fn = "warn" # `unsafe_op_in_unsafe_fn` may become the default in future Rust versions: https://github.com/rust-lang/rust/issues/71668 unused_extern_crates = "warn" unused_import_braces = "warn" unused_lifetimes = "warn" @@ -77,32 +79,40 @@ unused_lifetimes = "warn" trivial_casts = "allow" unused_qualifications = "allow" - [workspace.lints.rustdoc] all = "warn" +broken_intra_doc_links = "warn" missing_crate_level_docs = "warn" - +# See also clippy.toml [workspace.lints.clippy] +all = { level = "warn", priority = -1 } + allow_attributes = "warn" as_ptr_cast_mut = "warn" await_holding_lock = "warn" bool_to_int_with_if = "warn" branches_sharing_code = "warn" +cast_possible_wrap = "warn" char_lit_as_u8 = "warn" checked_conversions = "warn" clear_with_drain = "warn" +clone_on_ref_ptr = "warn" cloned_instead_of_copied = "warn" +coerce_container_to_any = "warn" +comparison_chain = "warn" dbg_macro = "warn" debug_assert_with_mut_call = "warn" default_union_representation = "warn" derive_partial_eq_without_eq = "warn" -disallowed_macros = "warn" # See clippy.toml -disallowed_methods = "warn" # See clippy.toml -disallowed_names = "warn" # See clippy.toml -disallowed_script_idents = "warn" # See clippy.toml -disallowed_types = "warn" # See clippy.toml +disallowed_macros = "warn" # See clippy.toml +disallowed_methods = "warn" # See clippy.toml +disallowed_names = "warn" # See clippy.toml +disallowed_script_idents = "warn" # See clippy.toml +disallowed_types = "warn" # See clippy.toml +doc_broken_link = "warn" doc_comment_double_space_linebreaks = "warn" +doc_include_without_cfg = "warn" doc_link_with_quotes = "warn" doc_markdown = "warn" elidable_lifetime_names = "warn" @@ -131,11 +141,11 @@ implied_bounds_in_impls = "warn" imprecise_flops = "warn" inconsistent_struct_constructor = "warn" index_refutable_slice = "warn" -indexing_slicing = "warn" inefficient_to_string = "warn" infinite_loop = "warn" into_iter_without_iter = "warn" invalid_upcast_comparisons = "warn" +ip_constant = "warn" iter_filter_is_ok = "warn" iter_filter_is_some = "warn" iter_not_returning_iterator = "warn" @@ -144,6 +154,7 @@ iter_on_single_items = "warn" iter_over_hash_type = "warn" iter_without_into_iter = "warn" large_digit_groups = "warn" +large_futures = "warn" large_include_file = "warn" large_stack_arrays = "warn" large_stack_frames = "warn" @@ -190,6 +201,7 @@ non_zero_suggestions = "warn" nonstandard_macro_braces = "warn" option_as_ref_cloned = "warn" option_option = "warn" +or_fun_call = "warn" path_buf_push_overwrite = "warn" pathbuf_init_then_push = "warn" precedence_bits = "warn" @@ -208,6 +220,7 @@ ref_patterns = "warn" rest_pat_in_fully_bound_structs = "warn" return_and_then = "warn" same_functions_in_if_condition = "warn" +self_only_used_in_recursion = "warn" semicolon_if_nothing_returned = "warn" set_contains_or_insert = "warn" should_panic_without_expect = "warn" @@ -220,7 +233,6 @@ string_add = "warn" string_add_assign = "warn" string_lit_as_bytes = "warn" string_lit_chars_any = "warn" -string_to_string = "warn" suspicious_command_arg_space = "warn" suspicious_xor_used_as_pow = "warn" todo = "warn" @@ -230,7 +242,7 @@ trailing_empty_array = "warn" trait_duplication_in_bounds = "warn" transmute_ptr_to_ptr = "warn" tuple_array_conversions = "warn" -unchecked_duration_subtraction = "warn" +unchecked_time_subtraction = "warn" undocumented_unsafe_blocks = "warn" unimplemented = "warn" uninhabited_references = "warn" @@ -245,6 +257,7 @@ unnecessary_semicolon = "warn" unnecessary_struct_initialization = "warn" unnecessary_wraps = "warn" unnested_or_patterns = "warn" +unused_async = "warn" unused_peekable = "warn" unused_rounding = "warn" unused_self = "warn" @@ -258,5 +271,8 @@ wildcard_dependencies = "warn" wildcard_imports = "warn" zero_sized_map_values = "warn" -manual_range_contains = "allow" # this is better on 'allow' -map_unwrap_or = "allow" # this is better on 'allow' +assigning_clones = "allow" # No please +manual_range_contains = "allow" # this one is just worse imho +map_unwrap_or = "allow" # so is this one +self_named_module_files = "allow" # Disabled waiting on https://github.com/rust-lang/rust-clippy/issues/9602 +significant_drop_tightening = "allow" # Too many false positives diff --git a/rust-toolchain b/rust-toolchain index 08eb121c..712fb0ff 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -5,6 +5,6 @@ # to the user in the error, instead of "error: invalid channel name '[toolchain]'". [toolchain] -channel = "1.88" # Avoid specifying a patch version here; see https://github.com/emilk/eframe_template/issues/145 +channel = "1.92.0" components = [ "rustfmt", "clippy" ] targets = [ "wasm32-unknown-unknown" ]