diff --git a/.github/workflows/cargo_machete.yml b/.github/workflows/cargo_machete.yml index deb830c8..7e574780 100644 --- a/.github/workflows/cargo_machete.yml +++ b/.github/workflows/cargo_machete.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.86 + toolchain: 1.88 - name: Machete install ## The official cargo-machete action uses: bnjbvr/cargo-machete@v0.9.1 diff --git a/.github/workflows/deploy_web_demo.yml b/.github/workflows/deploy_web_demo.yml index f88d8941..21cfb159 100644 --- a/.github/workflows/deploy_web_demo.yml +++ b/.github/workflows/deploy_web_demo.yml @@ -11,7 +11,6 @@ on: # release: # types: ["published"] - permissions: contents: write # for committing to gh-pages branch @@ -39,7 +38,7 @@ jobs: with: profile: minimal target: wasm32-unknown-unknown - toolchain: 1.86.0 + toolchain: 1.88.0 override: true - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/preview_build.yml b/.github/workflows/preview_build.yml index 9719b56a..fe37eb8c 100644 --- a/.github/workflows/preview_build.yml +++ b/.github/workflows/preview_build.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.86.0 + toolchain: 1.88.0 targets: wasm32-unknown-unknown - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fbda11cf..a8b2c0f7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,7 +19,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.86.0 + toolchain: 1.88.0 - name: Install packages (Linux) if: runner.os == 'Linux' @@ -85,7 +85,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.86.0 + toolchain: 1.88.0 targets: wasm32-unknown-unknown - run: sudo apt-get update && sudo apt-get install libgtk-3-dev libatk1.0-dev @@ -159,7 +159,7 @@ jobs: - uses: actions/checkout@v4 - uses: EmbarkStudios/cargo-deny-action@v2 with: - rust-version: "1.86.0" + rust-version: "1.88.0" log-level: error command: check arguments: --target ${{ matrix.target }} @@ -175,7 +175,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.86.0 + toolchain: 1.88.0 targets: aarch64-linux-android - name: Set up cargo cache @@ -197,7 +197,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.86.0 + toolchain: 1.88.0 targets: aarch64-apple-ios - name: Set up cargo cache @@ -217,7 +217,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.86.0 + toolchain: 1.88.0 - name: Set up cargo cache uses: Swatinem/rust-cache@v2 @@ -241,7 +241,7 @@ jobs: lfs: true - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.86.0 + toolchain: 1.88.0 - name: Set up cargo cache uses: Swatinem/rust-cache@v2 diff --git a/Cargo.toml b/Cargo.toml index 2202a3f1..7facc3c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ members = [ [workspace.package] edition = "2024" license = "MIT OR Apache-2.0" -rust-version = "1.86" +rust-version = "1.88" version = "0.32.3" @@ -163,8 +163,10 @@ 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_comment_double_space_linebreaks = "warn" doc_link_with_quotes = "warn" doc_markdown = "warn" +elidable_lifetime_names = "warn" empty_enum = "warn" empty_enum_variants_with_brackets = "warn" empty_line_after_outer_attr = "warn" @@ -184,6 +186,7 @@ fn_to_numeric_cast_any = "warn" from_iter_instead_of_collect = "warn" get_unwrap = "warn" if_let_mutex = "warn" +ignore_without_reason = "warn" implicit_clone = "warn" implied_bounds_in_impls = "warn" imprecise_flops = "warn" @@ -216,12 +219,12 @@ manual_instant_elapsed = "warn" manual_is_power_of_two = "warn" manual_is_variant_and = "warn" manual_let_else = "warn" +manual_midpoint = "warn" # NOTE `midpoint` is often a lot slower for floats, so we have our own `emath::fast_midpoint` function. manual_ok_or = "warn" manual_string_new = "warn" map_err_ignore = "warn" map_flatten = "warn" match_bool = "warn" -match_on_vec_items = "warn" match_same_arms = "warn" match_wild_err_arm = "warn" match_wildcard_for_single_variants = "warn" @@ -267,6 +270,7 @@ semicolon_if_nothing_returned = "warn" set_contains_or_insert = "warn" single_char_pattern = "warn" single_match_else = "warn" +single_option_map = "warn" str_split_at_newline = "warn" str_to_string = "warn" string_add = "warn" @@ -288,6 +292,7 @@ unimplemented = "warn" uninhabited_references = "warn" uninlined_format_args = "warn" unnecessary_box_returns = "warn" +unnecessary_debug_formatting = "warn" unnecessary_literal_bound = "warn" unnecessary_safety_comment = "warn" unnecessary_safety_doc = "warn" @@ -307,14 +312,6 @@ verbose_file_reads = "warn" wildcard_dependencies = "warn" zero_sized_map_values = "warn" -# Enable these when we update MSRV: -# doc_comment_double_space_linebreaks = "warn" -# elidable_lifetime_names = "warn" -# ignore_without_reason = "warn" -# manual_midpoint = "warn" # NOTE `midpoint` is often a lot slower for floats, so we have our own `emath::fast_midpoint` function. -# single_option_map = "warn" -# unnecessary_debug_formatting = "warn" - # TODO(emilk): maybe enable more of these lints? comparison_chain = "allow" diff --git a/clippy.toml b/clippy.toml index e988cb67..1b39bdae 100644 --- a/clippy.toml +++ b/clippy.toml @@ -3,7 +3,7 @@ # ----------------------------------------------------------------------------- # Section identical to scripts/clippy_wasm/clippy.toml: -msrv = "1.86" +msrv = "1.88" allow-unwrap-in-tests = true @@ -23,7 +23,7 @@ type-complexity-threshold = 350 # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros disallowed-macros = [ - 'dbg', + 'std::dbg', 'std::unimplemented', # TODO(emilk): consider forbidding these to encourage the use of proper log stream, and then explicitly allow legitimate uses @@ -59,8 +59,6 @@ disallowed-types = [ "std::sync::Condvar", # "std::sync::Once", # enabled for now as the `log_once` macro uses it internally - "ring::digest::SHA1_FOR_LEGACY_USE_ONLY", # SHA1 is cryptographically broken - "winit::dpi::LogicalSize", # We do our own pixels<->point conversion, taking `egui_ctx.zoom_factor` into account "winit::dpi::LogicalPosition", # We do our own pixels<->point conversion, taking `egui_ctx.zoom_factor` into account ] diff --git a/crates/egui/src/lib.rs b/crates/egui/src/lib.rs index 8b87866d..c62d7c16 100644 --- a/crates/egui/src/lib.rs +++ b/crates/egui/src/lib.rs @@ -3,7 +3,7 @@ //! Try the live web demo: . Read more about egui at . //! //! `egui` is in heavy development, with each new version having breaking changes. -//! You need to have rust 1.86.0 or later to use `egui`. +//! You need to have rust 1.88.0 or later to use `egui`. //! //! To quickly get started with egui, you can take a look at [`eframe_template`](https://github.com/emilk/eframe_template) //! which uses [`eframe`](https://docs.rs/eframe). diff --git a/crates/emath/src/smart_aim.rs b/crates/emath/src/smart_aim.rs index 8d083917..ebcd6832 100644 --- a/crates/emath/src/smart_aim.rs +++ b/crates/emath/src/smart_aim.rs @@ -113,7 +113,7 @@ fn simplest_digit_closed_range(min: i32, max: i32) -> i32 { if min <= 5 && 5 <= max { 5 } else { - (min + max) / 2 + min.midpoint(max) } } diff --git a/examples/confirm_exit/Cargo.toml b/examples/confirm_exit/Cargo.toml index a44ab868..59c7a1e7 100644 --- a/examples/confirm_exit/Cargo.toml +++ b/examples/confirm_exit/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/custom_3d_glow/Cargo.toml b/examples/custom_3d_glow/Cargo.toml index 7cef1f34..f302b664 100644 --- a/examples/custom_3d_glow/Cargo.toml +++ b/examples/custom_3d_glow/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/custom_font/Cargo.toml b/examples/custom_font/Cargo.toml index 3a2124b1..e1c1a625 100644 --- a/examples/custom_font/Cargo.toml +++ b/examples/custom_font/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/custom_font_style/Cargo.toml b/examples/custom_font_style/Cargo.toml index 4c44d598..76c16e4a 100644 --- a/examples/custom_font_style/Cargo.toml +++ b/examples/custom_font_style/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["tami5 "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/custom_keypad/Cargo.toml b/examples/custom_keypad/Cargo.toml index 76c8b5a6..b7882088 100644 --- a/examples/custom_keypad/Cargo.toml +++ b/examples/custom_keypad/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Varphone Wong "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/custom_style/Cargo.toml b/examples/custom_style/Cargo.toml index a079dfa1..9c82fbbd 100644 --- a/examples/custom_style/Cargo.toml +++ b/examples/custom_style/Cargo.toml @@ -3,7 +3,7 @@ name = "custom_style" version = "0.1.0" license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/custom_window_frame/Cargo.toml b/examples/custom_window_frame/Cargo.toml index ccb6ef73..99e3eda7 100644 --- a/examples/custom_window_frame/Cargo.toml +++ b/examples/custom_window_frame/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/external_eventloop/Cargo.toml b/examples/external_eventloop/Cargo.toml index 26eac721..ea63d9de 100644 --- a/examples/external_eventloop/Cargo.toml +++ b/examples/external_eventloop/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Will Brown "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/external_eventloop_async/Cargo.toml b/examples/external_eventloop_async/Cargo.toml index 418008cc..1b21ddae 100644 --- a/examples/external_eventloop_async/Cargo.toml +++ b/examples/external_eventloop_async/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Will Brown "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/file_dialog/Cargo.toml b/examples/file_dialog/Cargo.toml index 17bfb754..4a3f948d 100644 --- a/examples/file_dialog/Cargo.toml +++ b/examples/file_dialog/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/hello_android/Cargo.toml b/examples/hello_android/Cargo.toml index d5ebd01f..d563e48b 100644 --- a/examples/hello_android/Cargo.toml +++ b/examples/hello_android/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false # `unsafe_code` is required for `#[no_mangle]`, disable workspace lints to workaround lint error. diff --git a/examples/hello_world/Cargo.toml b/examples/hello_world/Cargo.toml index a3d02778..d715509d 100644 --- a/examples/hello_world/Cargo.toml +++ b/examples/hello_world/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/hello_world_par/Cargo.toml b/examples/hello_world_par/Cargo.toml index e3976cdf..79b698ec 100644 --- a/examples/hello_world_par/Cargo.toml +++ b/examples/hello_world_par/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Maxim Osipenko "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/hello_world_simple/Cargo.toml b/examples/hello_world_simple/Cargo.toml index 3256332c..547290d5 100644 --- a/examples/hello_world_simple/Cargo.toml +++ b/examples/hello_world_simple/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/images/Cargo.toml b/examples/images/Cargo.toml index 604573d2..e6b8e1dd 100644 --- a/examples/images/Cargo.toml +++ b/examples/images/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Jan Procházka "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/keyboard_events/Cargo.toml b/examples/keyboard_events/Cargo.toml index 3639cfe2..be99d0ef 100644 --- a/examples/keyboard_events/Cargo.toml +++ b/examples/keyboard_events/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Jose Palazon "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/multiple_viewports/Cargo.toml b/examples/multiple_viewports/Cargo.toml index 493e1a21..4ec65306 100644 --- a/examples/multiple_viewports/Cargo.toml +++ b/examples/multiple_viewports/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/puffin_profiler/Cargo.toml b/examples/puffin_profiler/Cargo.toml index b068d4a3..a98573d3 100644 --- a/examples/puffin_profiler/Cargo.toml +++ b/examples/puffin_profiler/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [package.metadata.cargo-machete] @@ -30,4 +30,4 @@ env_logger = { version = "0.10", default-features = false, features = [ log = { workspace = true } puffin = "0.19" puffin_http = "0.16" -profiling = {workspace = true, features = ["profile-with-puffin"] } +profiling = { workspace = true, features = ["profile-with-puffin"] } diff --git a/examples/screenshot/Cargo.toml b/examples/screenshot/Cargo.toml index ee2ef0bd..60aa948b 100644 --- a/examples/screenshot/Cargo.toml +++ b/examples/screenshot/Cargo.toml @@ -7,7 +7,7 @@ authors = [ ] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/serial_windows/Cargo.toml b/examples/serial_windows/Cargo.toml index c9dbc773..a82060f4 100644 --- a/examples/serial_windows/Cargo.toml +++ b/examples/serial_windows/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/examples/user_attention/Cargo.toml b/examples/user_attention/Cargo.toml index 6d502dcd..293f3f0a 100644 --- a/examples/user_attention/Cargo.toml +++ b/examples/user_attention/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["TicClick "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/rust-toolchain b/rust-toolchain index 2fda45d2..20a74465 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.86.0" +channel = "1.88.0" components = ["rustfmt", "clippy"] targets = ["wasm32-unknown-unknown"] diff --git a/scripts/check.sh b/scripts/check.sh index 68120b78..ffee218f 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -9,7 +9,7 @@ set -x # Checks all tests, lints etc. # Basically does what the CI does. -# cargo +1.86.0 install --quiet typos-cli +# cargo +1.88.0 install --quiet typos-cli export RUSTFLAGS="-D warnings" export RUSTDOCFLAGS="-D warnings" # https://github.com/emilk/egui/pull/1454 diff --git a/scripts/clippy_wasm/clippy.toml b/scripts/clippy_wasm/clippy.toml index fbe946e8..c138ea5b 100644 --- a/scripts/clippy_wasm/clippy.toml +++ b/scripts/clippy_wasm/clippy.toml @@ -6,7 +6,7 @@ # ----------------------------------------------------------------------------- # Section identical to the root clippy.toml: -msrv = "1.86" +msrv = "1.88" allow-unwrap-in-tests = true diff --git a/tests/test_egui_extras_compilation/Cargo.toml b/tests/test_egui_extras_compilation/Cargo.toml index 1bf772c5..6bfc96e3 100644 --- a/tests/test_egui_extras_compilation/Cargo.toml +++ b/tests/test_egui_extras_compilation/Cargo.toml @@ -3,7 +3,7 @@ name = "test_egui_extras_compilation" version = "0.1.0" license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/tests/test_inline_glow_paint/Cargo.toml b/tests/test_inline_glow_paint/Cargo.toml index 6cb29417..16a42ecb 100644 --- a/tests/test_inline_glow_paint/Cargo.toml +++ b/tests/test_inline_glow_paint/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/tests/test_size_pass/Cargo.toml b/tests/test_size_pass/Cargo.toml index 2a6c73be..3d8b954d 100644 --- a/tests/test_size_pass/Cargo.toml +++ b/tests/test_size_pass/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/tests/test_ui_stack/Cargo.toml b/tests/test_ui_stack/Cargo.toml index 65d808a0..50b62941 100644 --- a/tests/test_ui_stack/Cargo.toml +++ b/tests/test_ui_stack/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Antoine Beyeler "] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints] diff --git a/tests/test_viewports/Cargo.toml b/tests/test_viewports/Cargo.toml index eca0cda8..7f19a9de 100644 --- a/tests/test_viewports/Cargo.toml +++ b/tests/test_viewports/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["konkitoman"] license = "MIT OR Apache-2.0" edition = "2024" -rust-version = "1.86" +rust-version = "1.88" publish = false [lints]