Upgrade minimum Rust version to 1.83 (#9815)

This reverts commit 6cc7a560f7 to reapply
#9511 since we've disabled ppc64le-musl per #9793
This commit is contained in:
Zanie Blue 2024-12-11 10:06:19 -06:00 committed by GitHub
parent f64da9b763
commit ae25c2f4db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 72 additions and 65 deletions

View file

@ -135,7 +135,7 @@ impl CandidateSelector {
is_excluded: bool,
index: Option<&'a IndexUrl>,
env: &ResolverEnvironment,
) -> Option<Candidate> {
) -> Option<Candidate<'a>> {
// In the branches, we "sort" the preferences by marker-matching through an iterator that
// first has the matching half and then the mismatching half.
let preferences_match = preferences
@ -282,7 +282,7 @@ impl CandidateSelector {
range: &Range<Version>,
version_maps: &'a [VersionMap],
env: &ResolverEnvironment,
) -> Option<Candidate> {
) -> Option<Candidate<'a>> {
trace!(
"Selecting candidate for {package_name} with range {range} with {} remote versions",
version_maps.iter().map(VersionMap::len).sum::<usize>(),

View file

@ -787,7 +787,7 @@ impl<'range> From<&'range Range<Version>> for SentinelRange<'range> {
}
}
impl<'range> SentinelRange<'range> {
impl SentinelRange<'_> {
/// Returns `true` if the range appears to be, e.g., `>1.0.0, <1.0.0+[max]`.
pub fn is_sentinel(&self) -> bool {
self.0.iter().all(|(lower, upper)| {

View file

@ -2752,7 +2752,7 @@ impl<'de> serde::de::Deserialize<'de> for RegistrySource {
{
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
impl serde::de::Visitor<'_> for Visitor {
type Value = RegistrySource;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
@ -2973,7 +2973,7 @@ impl SourceDist {
) -> Result<Option<SourceDist>, LockError> {
// Reject distributions from registries that don't match the index URL, as can occur with
// `--find-links`.
if !index.is_some_and(|index| *index == reg_dist.index) {
if index.is_none_or(|index| *index != reg_dist.index) {
return Ok(None);
}

View file

@ -111,7 +111,7 @@ impl PubGrubDependency {
// Detect self-dependencies.
if dev.is_none() {
debug_assert!(
!source_name.is_some_and(|source_name| source_name == name),
source_name.is_none_or(|source_name| source_name != name),
"extras not flattened for {name}"
);
}
@ -125,7 +125,7 @@ impl PubGrubDependency {
// Detect self-dependencies.
if dev.is_none() {
debug_assert!(
!source_name.is_some_and(|source_name| source_name == name),
source_name.is_none_or(|source_name| source_name != name),
"group not flattened for {name}"
);
}