-
- Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
incompatible_msrv is a relatively new lint introduced in 1.78
Use Case
a library might set a lower MSRV and enable features for higher rustversion
We have this pattern in https://github.com/yewstack/yew
#[rustversion::since(1.88)] fn derive_debug_tag(vtag: &Ident) -> String { let span = vtag.span().unwrap(); format!("[{}:{}:{}] ", span.file(), span.line(), span.column()) } #[rustversion::before(1.88)] fn derive_debug_tag(_: &Ident) -> &'static str { "" }where span.file, span.line, span.column are stable since 1.88 and most of the project itself has a lower MSRV of 1.78, as set in the Cargo.toml of the crates:
[package] name = "yew" rust-version = "1.78.0"Clippy will emit the incompatible msrv clippy warning for people on 1.88 and newer.
Adding #[allow(clippy::incompatible_msrv)] automatically might be a good idea.
Metadata
Metadata
Assignees
Labels
No labels