Skip to content

Commit

Permalink
Bump MSRV (Minimum Supported Rust Version) to 1.54.0 (emilk#703)
Browse files Browse the repository at this point in the history
1.51.0 clippy has been giving me trouble (not reporting all problems),
and so I take the easy way out and just bump MSRV.

We will upgrade to 1.56.0 once it comes around anyway
to get access to that sweet disjoint capture in closures
(https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html)
  • Loading branch information
emilk authored Sep 8, 2021
1 parent ae6418e commit f37180f
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 125 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: 1.54.0
override: true
- run: sudo apt-get install libspeechd-dev
- uses: actions-rs/cargo@v1
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: 1.54.0
override: true
- run: sudo apt-get install libspeechd-dev
- uses: actions-rs/cargo@v1
Expand All @@ -48,7 +48,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: 1.54.0
override: true
- run: rustup target add wasm32-unknown-unknown
- uses: actions-rs/cargo@v1
Expand All @@ -64,7 +64,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: 1.54.0
override: true
- run: rustup target add wasm32-unknown-unknown
- uses: actions-rs/cargo@v1
Expand All @@ -80,7 +80,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: 1.54.0
override: true
- run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev
- uses: actions-rs/cargo@v1
Expand All @@ -96,7 +96,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: 1.54.0
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
Expand All @@ -112,7 +112,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: 1.54.0
override: true
- run: rustup component add clippy
- run: sudo apt-get install libspeechd-dev
Expand All @@ -129,7 +129,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: 1.54.0
override: true
- run: sudo apt-get install libspeechd-dev
- run: cargo doc -p emath -p epaint -p egui -p eframe -p epi -p egui_web -p egui_glium --lib --no-deps --all-features
Expand All @@ -142,7 +142,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: 1.54.0
override: true
- run: sudo apt-get install libspeechd-dev
- run: rustup target add wasm32-unknown-unknown
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ NOTE: [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md) and [
* All `Ui`:s must now have a finite `max_rect`.
* Deprecated: `max_rect_finite`, `available_size_before_wrap_finite` and `available_rect_before_wrap_finite`.
* `Painter`/`Fonts`: text layout now expect color when creating a `Galley`. You may override that color with `Painter::galley_with_color`.
* MSRV (Minimum Supported Rust Version) is now `1.54.0`.

### Fixed 🐛
* Fix wrongly sized multiline `TextEdit` in justified layouts.
Expand Down
9 changes: 1 addition & 8 deletions eframe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,8 @@
// Forbid warnings in release builds:
#![cfg_attr(not(debug_assertions), deny(warnings))]
// Disabled so we can support rust 1.51:
// #![deny(
// rustdoc::broken_intra_doc_links,
// rustdoc::invalid_codeblock_attributes,
// rustdoc::missing_crate_level_docs,
// rustdoc::private_intra_doc_links
// )]
#![forbid(unsafe_code)]
#![warn(clippy::all, missing_docs, rust_2018_idioms)]
#![warn(clippy::all, missing_crate_level_docs, missing_docs, rust_2018_idioms)]

pub use {egui, epi};

Expand Down
10 changes: 2 additions & 8 deletions egui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! Try the live web demo: <https://emilk.github.io/egui/index.html>. Read more about egui at <https://github.com/emilk/egui>.
//!
//! `egui` is in heavy development, with each new version having breaking changes.
//! You need to have rust 1.51.0 or later to use `egui`.
//! You need to have rust 1.54.0 or later to use `egui`.
//!
//! To quickly get started with egui, you can take a look at [`egui_template`](https://github.com/emilk/egui_template)
//! which uses [`eframe`](https://docs.rs/eframe).
Expand Down Expand Up @@ -267,13 +267,6 @@
// Forbid warnings in release builds:
#![cfg_attr(not(debug_assertions), deny(warnings))]
// Disabled so we can support rust 1.51:
// #![deny(
// rustdoc::broken_intra_doc_links,
// rustdoc::invalid_codeblock_attributes,
// rustdoc::missing_crate_level_docs,
// rustdoc::private_intra_doc_links
// )]
#![forbid(unsafe_code)]
#![warn(
clippy::all,
Expand Down Expand Up @@ -336,6 +329,7 @@
clippy::verbose_file_reads,
clippy::zero_sized_map_values,
future_incompatible,
missing_crate_level_docs,
nonstandard_style,
rust_2018_idioms
)]
Expand Down
7 changes: 0 additions & 7 deletions egui_demo_app/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
// Forbid warnings in release builds:
#![cfg_attr(not(debug_assertions), deny(warnings))]
// Disabled so we can support rust 1.51:
// #![deny(
// rustdoc::broken_intra_doc_links,
// rustdoc::invalid_codeblock_attributes,
// rustdoc::missing_crate_level_docs,
// rustdoc::private_intra_doc_links
// )]
#![forbid(unsafe_code)]
#![warn(clippy::all, rust_2018_idioms)]

Expand Down
7 changes: 0 additions & 7 deletions egui_demo_app/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
// Forbid warnings in release builds:
#![cfg_attr(not(debug_assertions), deny(warnings))]
// Disabled so we can support rust 1.51:
// #![deny(
// rustdoc::broken_intra_doc_links,
// rustdoc::invalid_codeblock_attributes,
// rustdoc::missing_crate_level_docs,
// rustdoc::private_intra_doc_links
// )]
#![forbid(unsafe_code)]
#![warn(clippy::all, rust_2018_idioms)]

Expand Down
8 changes: 1 addition & 7 deletions egui_demo_lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
// Forbid warnings in release builds:
#![cfg_attr(not(debug_assertions), deny(warnings))]
// Disabled so we can support rust 1.51:
// #![deny(
// rustdoc::broken_intra_doc_links,
// rustdoc::invalid_codeblock_attributes,
// rustdoc::missing_crate_level_docs,
// rustdoc::private_intra_doc_links
// )]
#![forbid(unsafe_code)]
#![warn(
clippy::all,
Expand Down Expand Up @@ -73,6 +66,7 @@
clippy::verbose_file_reads,
clippy::zero_sized_map_values,
future_incompatible,
missing_crate_level_docs,
nonstandard_style,
rust_2018_idioms
)]
Expand Down
9 changes: 1 addition & 8 deletions egui_glium/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@
// Forbid warnings in release builds:
#![cfg_attr(not(debug_assertions), deny(warnings))]
// Disabled so we can support rust 1.51:
// #![deny(
// rustdoc::broken_intra_doc_links,
// rustdoc::invalid_codeblock_attributes,
// rustdoc::missing_crate_level_docs,
// rustdoc::private_intra_doc_links
// )]
#![forbid(unsafe_code)]
#![warn(clippy::all, rust_2018_idioms)]
#![warn(clippy::all, missing_crate_level_docs, rust_2018_idioms)]
#![allow(clippy::manual_range_contains, clippy::single_match)]

mod backend;
Expand Down
9 changes: 1 addition & 8 deletions egui_web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,8 @@
// Forbid warnings in release builds:
#![cfg_attr(not(debug_assertions), deny(warnings))]
// Disabled so we can support rust 1.51:
// #![deny(
// rustdoc::broken_intra_doc_links,
// rustdoc::invalid_codeblock_attributes,
// rustdoc::missing_crate_level_docs,
// rustdoc::private_intra_doc_links
// )]
#![forbid(unsafe_code)]
#![warn(clippy::all, rust_2018_idioms)]
#![warn(clippy::all, missing_crate_level_docs, rust_2018_idioms)]

pub mod backend;
mod painter;
Expand Down
31 changes: 0 additions & 31 deletions egui_web/src/shader/vertex_100es.glsl

This file was deleted.

15 changes: 5 additions & 10 deletions egui_web/src/webgl1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ impl WebGlPainter {

let srgb_supported = matches!(gl.get_extension("EXT_sRGB"), Ok(Some(_)));

let vert_shader = compile_shader(
&gl,
Gl::VERTEX_SHADER,
include_str!("shader/main_vertex_100es.glsl"),
)?;
let (texture_format, program, post_process) = if srgb_supported {
let vert_shader = compile_shader(
&gl,
Gl::VERTEX_SHADER,
include_str!("shader/main_vertex_100es.glsl"),
)?;
let frag_shader = compile_shader(
&gl,
Gl::FRAGMENT_SHADER,
Expand All @@ -82,11 +82,6 @@ impl WebGlPainter {

(ExtSRgb::SRGB_ALPHA_EXT, program, Some(post_process))
} else {
let vert_shader = compile_shader(
&gl,
Gl::VERTEX_SHADER,
include_str!("shader/vertex_100es.glsl"),
)?;
let frag_shader = compile_shader(
&gl,
Gl::FRAGMENT_SHADER,
Expand Down
8 changes: 1 addition & 7 deletions emath/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
// Forbid warnings in release builds:
#![cfg_attr(not(debug_assertions), deny(warnings))]
// Disabled so we can support rust 1.51:
// #![deny(
// rustdoc::broken_intra_doc_links,
// rustdoc::invalid_codeblock_attributes,
// rustdoc::missing_crate_level_docs,
// rustdoc::private_intra_doc_links
// )]
#![forbid(unsafe_code)]
#![warn(
clippy::all,
Expand Down Expand Up @@ -80,6 +73,7 @@
clippy::verbose_file_reads,
clippy::zero_sized_map_values,
future_incompatible,
missing_crate_level_docs,
nonstandard_style,
rust_2018_idioms
)]
Expand Down
8 changes: 1 addition & 7 deletions epaint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
// Forbid warnings in release builds:
#![cfg_attr(not(debug_assertions), deny(warnings))]
// Disabled so we can support rust 1.51:
// #![deny(
// rustdoc::broken_intra_doc_links,
// rustdoc::invalid_codeblock_attributes,
// rustdoc::missing_crate_level_docs,
// rustdoc::private_intra_doc_links
// )]
#![forbid(unsafe_code)]
#![warn(
clippy::all,
Expand Down Expand Up @@ -71,6 +64,7 @@
clippy::verbose_file_reads,
clippy::zero_sized_map_values,
future_incompatible,
missing_crate_level_docs,
nonstandard_style,
rust_2018_idioms
)]
Expand Down
10 changes: 3 additions & 7 deletions epi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
// Forbid warnings in release builds:
#![cfg_attr(not(debug_assertions), deny(warnings))]
// Disabled so we can support rust 1.51:
// #![deny(
// rustdoc::broken_intra_doc_links,
// rustdoc::invalid_codeblock_attributes,
// rustdoc::missing_crate_level_docs,
// rustdoc::private_intra_doc_links
// )]
#![forbid(unsafe_code)]
#![warn(
clippy::all,
Expand Down Expand Up @@ -77,11 +70,13 @@
clippy::verbose_file_reads,
clippy::zero_sized_map_values,
future_incompatible,
missing_crate_level_docs,
nonstandard_style,
rust_2018_idioms
)]
#![allow(clippy::float_cmp)]
#![allow(clippy::manual_range_contains)]
#![warn(missing_docs)] // Let's keep `epi` well-documented.

pub use egui; // Re-export for user convenience

Expand Down Expand Up @@ -312,6 +307,7 @@ pub trait TextureAllocator {

/// Abstraction for platform dependent texture reference
pub trait NativeTexture {
/// The native texture type.
type Texture;

/// Bind native texture to egui texture
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".

[toolchain]
channel = "1.51.0"
channel = "1.54.0"
components = [ "rustfmt", "clippy" ]
targets = [ "wasm32-unknown-unknown" ]

0 comments on commit f37180f

Please sign in to comment.