Skip to content

Commit 40d9f0f

Browse files
emilkhacknus
authored andcommitted
Update to Rust 1.76 (emilk#4411)
Motivation: I want to replace `cargo-cranky` with workspace lints, first available in Rust 1.74. However, `cargo doc` would hange on `wgpu` and `wgpu-core` on 1.74 and 1.75… so now we're on 1.76. I think this is fine - when 1.78 is released next week we're still two versions behind the bleeding edge. …and the branch name is just wrong 🤦
1 parent e7c2e7b commit 40d9f0f

File tree

37 files changed

+45
-48
lines changed

37 files changed

+45
-48
lines changed

.github/workflows/deploy_web_demo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
profile: minimal
4545
target: wasm32-unknown-unknown
46-
toolchain: 1.72.0
46+
toolchain: 1.76.0
4747
override: true
4848

4949
- uses: Swatinem/rust-cache@v2

.github/workflows/rust.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- uses: dtolnay/rust-toolchain@master
2121
with:
22-
toolchain: 1.72.0
22+
toolchain: 1.76.0
2323

2424
- name: Install packages (Linux)
2525
if: runner.os == 'Linux'
@@ -93,7 +93,7 @@ jobs:
9393
- uses: actions/checkout@v4
9494
- uses: dtolnay/rust-toolchain@master
9595
with:
96-
toolchain: 1.72.0
96+
toolchain: 1.76.0
9797
targets: wasm32-unknown-unknown
9898

9999
- run: sudo apt-get update && sudo apt-get install libgtk-3-dev libatk1.0-dev
@@ -151,7 +151,7 @@ jobs:
151151
- uses: actions/checkout@v4
152152
- uses: EmbarkStudios/cargo-deny-action@v1
153153
with:
154-
rust-version: "1.72.0"
154+
rust-version: "1.76.0"
155155
log-level: error
156156
command: check
157157
arguments: --target ${{ matrix.target }}
@@ -166,7 +166,7 @@ jobs:
166166

167167
- uses: dtolnay/rust-toolchain@master
168168
with:
169-
toolchain: 1.72.0
169+
toolchain: 1.76.0
170170
targets: aarch64-linux-android
171171

172172
- name: Set up cargo cache
@@ -184,7 +184,7 @@ jobs:
184184
- uses: actions/checkout@v4
185185
- uses: dtolnay/rust-toolchain@master
186186
with:
187-
toolchain: 1.72.0
187+
toolchain: 1.76.0
188188

189189
- name: Set up cargo cache
190190
uses: Swatinem/rust-cache@v2

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ members = [
2121
[workspace.package]
2222
edition = "2021"
2323
license = "MIT OR Apache-2.0"
24-
rust-version = "1.72"
24+
rust-version = "1.76"
2525
version = "0.27.2"
2626

2727

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# -----------------------------------------------------------------------------
44
# Section identical to scripts/clippy_wasm/clippy.toml:
55

6-
msrv = "1.72"
6+
msrv = "1.76"
77

88
allow-unwrap-in-tests = true
99

crates/eframe/src/native/app_icon.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,7 @@ fn set_title_and_icon_mac(title: &str, icon_data: Option<&IconData>) -> AppIconS
225225
}
226226

227227
unsafe {
228-
let app = if let Some(app) = NSApp {
229-
app
230-
} else {
228+
let Some(app) = NSApp else {
231229
log::debug!("NSApp is null");
232230
return AppIconStatus::NotSetIgnored;
233231
};

crates/eframe/src/native/run.rs

+4
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,8 @@ pub fn run_glow(
391391
mut native_options: epi::NativeOptions,
392392
app_creator: epi::AppCreator,
393393
) -> Result<()> {
394+
#![allow(clippy::needless_return_with_question_mark)] // False positive
395+
394396
use super::glow_integration::GlowWinitApp;
395397

396398
#[cfg(not(target_os = "ios"))]
@@ -414,6 +416,8 @@ pub fn run_wgpu(
414416
mut native_options: epi::NativeOptions,
415417
app_creator: epi::AppCreator,
416418
) -> Result<()> {
419+
#![allow(clippy::needless_return_with_question_mark)] // False positive
420+
417421
use super::wgpu_integration::WgpuWinitApp;
418422

419423
#[cfg(not(target_os = "ios"))]

crates/eframe/src/web/storage.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub(crate) fn load_memory(_: &egui::Context) {}
3131

3232
#[cfg(feature = "persistence")]
3333
pub(crate) fn save_memory(ctx: &egui::Context) {
34-
match ctx.memory(|mem| ron::to_string(mem)) {
34+
match ctx.memory(ron::to_string) {
3535
Ok(ron) => {
3636
local_storage_set("egui_memory_ron", &ron);
3737
}

crates/egui/src/containers/collapsing_header.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl CollapsingState {
230230
}
231231
}
232232

233-
/// Paint this [CollapsingState](CollapsingState)'s toggle button. Takes an [IconPainter](IconPainter) as the icon.
233+
/// Paint this [`CollapsingState`]'s toggle button. Takes an [`IconPainter`] as the icon.
234234
/// ```
235235
/// # egui::__run_test_ui(|ui| {
236236
/// fn circle_icon(ui: &mut egui::Ui, openness: f32, response: &egui::Response) {

crates/egui/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ macro_rules! include_image {
517517
};
518518
}
519519

520-
/// Create a [`Hyperlink`](crate::Hyperlink) to the current [`file!()`] (and line) on Github
520+
/// Create a [`Hyperlink`] to the current [`file!()`] (and line) on Github
521521
///
522522
/// ```
523523
/// # egui::__run_test_ui(|ui| {
@@ -532,7 +532,7 @@ macro_rules! github_link_file_line {
532532
}};
533533
}
534534

535-
/// Create a [`Hyperlink`](crate::Hyperlink) to the current [`file!()`] on github.
535+
/// Create a [`Hyperlink`] to the current [`file!()`] on github.
536536
///
537537
/// ```
538538
/// # egui::__run_test_ui(|ui| {

crates/egui/src/memory.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ impl Memory {
868868
// ----------------------------------------------------------------------------
869869

870870
/// Keeps track of [`Area`](crate::containers::area::Area)s, which are free-floating [`Ui`](crate::Ui)s.
871-
/// These [`Area`](crate::containers::area::Area)s can be in any [`Order`](crate::Order).
871+
/// These [`Area`](crate::containers::area::Area)s can be in any [`Order`].
872872
#[derive(Clone, Debug, Default)]
873873
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
874874
#[cfg_attr(feature = "serde", serde(default))]

crates/egui/src/style.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ pub struct Spacing {
288288
/// Default rail height of a [`Slider`].
289289
pub slider_rail_height: f32,
290290

291-
/// Default (minimum) width of a [`ComboBox`](crate::ComboBox).
291+
/// Default (minimum) width of a [`ComboBox`].
292292
pub combo_width: f32,
293293

294294
/// Default width of a [`TextEdit`].

crates/egui_extras/src/table.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl Column {
131131
self
132132
}
133133

134-
/// Allowed range of movement (in points), if in a resizable [`Table`](crate::table::Table).
134+
/// Allowed range of movement (in points), if in a resizable [`Table`].
135135
#[inline]
136136
pub fn range(mut self, range: impl Into<Rangef>) -> Self {
137137
self.width_range = range.into();

crates/epaint/src/shape.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -1293,12 +1293,7 @@ impl std::fmt::Debug for PaintCallback {
12931293

12941294
impl std::cmp::PartialEq for PaintCallback {
12951295
fn eq(&self, other: &Self) -> bool {
1296-
// As I understand it, the problem this clippy is trying to protect against
1297-
// can only happen if we do dynamic casts back and forth on the pointers, and we don't do that.
1298-
#[allow(clippy::vtable_address_comparisons)]
1299-
{
1300-
self.rect.eq(&other.rect) && Arc::ptr_eq(&self.callback, &other.callback)
1301-
}
1296+
self.rect.eq(&other.rect) && Arc::ptr_eq(&self.callback, &other.callback)
13021297
}
13031298
}
13041299

examples/confirm_exit/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/custom_3d_glow/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/custom_font/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/custom_font_style/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["tami5 <kkharji@proton.me>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/custom_keypad/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Varphone Wong <varphone@qq.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/custom_plot_manipulation/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Ygor Souza <ygor.souza@protonmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/custom_window_frame/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/file_dialog/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/hello_world/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/hello_world_par/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Maxim Osipenko <maxim1999max@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/hello_world_simple/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/images/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Jan Procházka <github.com/jprochazk>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/images/src/ferris.svg

+1-1
Loading

examples/keyboard_events/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Jose Palazon <jose@palako.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/multiple_viewports/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010
[features]

examples/puffin_profiler/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/save_plot/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["hacknus <l_stoeckli@bluewin.ch>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010
[dependencies]

examples/screenshot/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ authors = [
77
]
88
license = "MIT OR Apache-2.0"
99
edition = "2021"
10-
rust-version = "1.72"
10+
rust-version = "1.76"
1111
publish = false
1212

1313

examples/serial_windows/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010

examples/test_inline_glow_paint/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

examples/test_viewports/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["konkitoman"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010
[features]

examples/user_attention/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["TicClick <ya@ticclick.ch>"]
55
license = "MIT OR Apache-2.0"
66
edition = "2021"
7-
rust-version = "1.72"
7+
rust-version = "1.76"
88
publish = false
99

1010
[dependencies]

rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".
66

77
[toolchain]
8-
channel = "1.72.0"
8+
channel = "1.76.0"
99
components = ["rustfmt", "clippy"]
1010
targets = ["wasm32-unknown-unknown"]

scripts/clippy_wasm/clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# -----------------------------------------------------------------------------
77
# Section identical to the root clippy.toml:
88

9-
msrv = "1.72"
9+
msrv = "1.76"
1010

1111
allow-unwrap-in-tests = true
1212

0 commit comments

Comments
 (0)