Skip to content

Document minimum Rust requirement (1.50) #240

@jorgenpt

Description

@jorgenpt

When I attempted to build egui with rustc 1.49 (which was the latest until a bit more than a month ago), the build failed with an unclear error:

error[E0658]: use of unstable library feature 'bool_to_option'
   --> /Users/jorgenpt/.cargo/registry/src/github.com-1ecc6299db9ec823/egui-0.10.0/src/widgets/drag_value.rs:262:26
    |
262 |                         .then(|| drag_state.last_dragged_value)
    |                          ^^^^
    |
    = note: see issue #64260 <https://github.com/rust-lang/rust/issues/64260> for more information

I was confused, because it didn't seem like egui would require a nightly rustc. After a bit of digging I realized that bool.then was added in 1.50! I couldn't find any reasonable way to set a rust requirement in Cargo.toml (looks like there's still a pending RFC to set "Minimum Supported Rust Version" (MSRV)).

It might be good to document somewhere that 1.50 is required, or that the above error message indicates that you need to upgrade your local rustc. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions