You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `manual_unwrap_or` lint was incorrectly suggesting `unwrap_or_default()` when the MSRV was set to 1.15 or lower, even though `unwrap_or_default()` was only stabilized in Rust 1.16.
Changes made:
1. Fixed the MSRV check in `manual_unwrap_or.rs` to use the correct constant `msrvs::UNWRAP_OR_DEFAULT` instead of `msrvs::STR_REPEAT`
2. Added the `UNWRAP_OR_DEFAULT` constant to the MSRV aliases in `msrvs.rs`, marking it as stabilized in Rust 1.16
This ensures that the lint will only suggest using `unwrap_or_default()` when the MSRV is at least 1.16.
changelog: Fix [`manual_unwrap_or`] false positive when MSRV is below 1.16
On branch Fix-`manual_unwrap_or`-lint-to-respect-MSRV-for-`unwrap_or_default()`
Changes to be committed:
modified: clippy_lints/src/matches/manual_unwrap_or.rs
modified: clippy_lints/src/matches/mod.rs
modified: clippy_utils/src/msrvs.rs
0 commit comments