Skip to content

Bump MSRV to 1.92#11423

Open
tronical wants to merge 4 commits intomasterfrom
simon/msrv
Open

Bump MSRV to 1.92#11423
tronical wants to merge 4 commits intomasterfrom
simon/msrv

Conversation

@tronical
Copy link
Copy Markdown
Member

No description provided.

@ogoffart
Copy link
Copy Markdown
Member

Please don't start the title with ChangeLog.
Put the ChangeLog entry in the commit message but not the title

(otherwise it sounds like the commit touches only the changelog)

ChangeLog: Bump MSRV to 1.92
@tronical tronical changed the title ChangeLog: Bump MSRV to 1.92 Bump MSRV to 1.92 Apr 17, 2026
@tronical
Copy link
Copy Markdown
Member Author

Done :)

@ogoffart
Copy link
Copy Markdown
Member

Relevant: (not sure if need to be done in this PR though)

internal/compiler/lexer.rs:            // Once MSRV is 1.91
internal/compiler/passes/repeater_component.rs:        // Could use Vec::extract_if if MSRV >= 1.87
internal/compiler/translations.rs:        // slice::trim_ascii_start when MSRV >= 1.80
internal/core/graphics/color.rs:// until slint uses rust 1.90 as MSRV.
docs/building.md:have Rust installed, make sure that it's at least version 1.88 or newer. You can check which version you have installed

The rust-version of the helper crate is not using the workspace and so may block cargo update (I don't know if this is a problem or not)

Copy link
Copy Markdown
Member

@ogoffart ogoffart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also update the instance in docs/building.md

@tronical
Copy link
Copy Markdown
Member Author

I've upgraded all the places in the code you mentioned.

@expenses Do you remember what you meant with this?

// until slint uses rust 1.90 as MSRV.
const fn round(mut value: f32) -> u8 {
    if value % 1.0 > 0.5 {
        value += 0.5;
    }

    value as _
}

@expenses
Copy link
Copy Markdown
Contributor

I've upgraded all the places in the code you mentioned.

@expenses Do you remember what you meant with this?

// until slint uses rust 1.90 as MSRV.
const fn round(mut value: f32) -> u8 {
    if value % 1.0 > 0.5 {
        value += 0.5;
    }

    value as _
}

https://doc.rust-lang.org/std/primitive.f32.html#method.round f32::round was only made const in 1.90

@tronical
Copy link
Copy Markdown
Member Author

Thanks. I've now replaced round(value * 255.0) with (value * 255.0).round() as u8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants