Upgrade Rust toolchain to 1.83 (#14677)

This commit is contained in:
Micha Reiser 2024-11-29 13:05:05 +01:00 committed by GitHub
parent a6402fb51e
commit b63c2e126b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
63 changed files with 127 additions and 127 deletions

View file

@ -416,7 +416,7 @@ impl<'db> Iterator for SearchPathIterator<'db> {
}
}
impl<'db> FusedIterator for SearchPathIterator<'db> {}
impl FusedIterator for SearchPathIterator<'_> {}
/// Represents a single `.pth` file in a `site-packages` directory.
/// One or more lines in a `.pth` file may be a (relative or absolute)

View file

@ -400,7 +400,7 @@ pub(crate) struct ConstraintsIterator<'map, 'db> {
constraint_ids: ConstraintIdIterator<'map>,
}
impl<'map, 'db> Iterator for ConstraintsIterator<'map, 'db> {
impl<'db> Iterator for ConstraintsIterator<'_, 'db> {
type Item = Constraint<'db>;
fn next(&mut self) -> Option<Self::Item> {
@ -424,7 +424,7 @@ impl DeclarationsIterator<'_, '_> {
}
}
impl<'map, 'db> Iterator for DeclarationsIterator<'map, 'db> {
impl<'db> Iterator for DeclarationsIterator<'_, 'db> {
type Item = Definition<'db>;
fn next(&mut self) -> Option<Self::Item> {

View file

@ -401,7 +401,7 @@ pub(super) struct DeclarationIdIterator<'a> {
inner: DeclarationsIterator<'a>,
}
impl<'a> Iterator for DeclarationIdIterator<'a> {
impl Iterator for DeclarationIdIterator<'_> {
type Item = ScopedDefinitionId;
fn next(&mut self) -> Option<Self::Item> {

View file

@ -2023,7 +2023,7 @@ impl<'db> TypeVarInstance<'db> {
}
#[allow(unused)]
pub(crate) fn constraints(self, db: &'db dyn Db) -> Option<&[Type<'db>]> {
pub(crate) fn constraints(self, db: &'db dyn Db) -> Option<&'db [Type<'db>]> {
if let Some(TypeVarBoundOrConstraints::Constraints(tuple)) = self.bound_or_constraints(db) {
Some(tuple.elements(db))
} else {
@ -2567,7 +2567,7 @@ impl<'db> Class<'db> {
///
/// Were this not a salsa query, then the calling query
/// would depend on the class's AST and rerun for every change in that file.
fn explicit_bases(self, db: &'db dyn Db) -> &[Type<'db>] {
fn explicit_bases(self, db: &'db dyn Db) -> &'db [Type<'db>] {
self.explicit_bases_query(db)
}
@ -2995,7 +2995,7 @@ pub struct SliceLiteralType<'db> {
step: Option<i32>,
}
impl<'db> SliceLiteralType<'db> {
impl SliceLiteralType<'_> {
fn as_tuple(self, db: &dyn Db) -> (Option<i32>, Option<i32>, Option<i32>) {
(self.start(db), self.stop(db), self.step(db))
}

View file

@ -289,7 +289,7 @@ struct DisplayMaybeNegatedType<'db> {
negated: bool,
}
impl<'db> Display for DisplayMaybeNegatedType<'db> {
impl Display for DisplayMaybeNegatedType<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
if self.negated {
f.write_str("~")?;
@ -319,7 +319,7 @@ pub(crate) struct DisplayTypeArray<'b, 'db> {
db: &'db dyn Db,
}
impl<'db> Display for DisplayTypeArray<'_, 'db> {
impl Display for DisplayTypeArray<'_, '_> {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.join(", ")
.entries(self.types.iter().map(|ty| ty.display(self.db)))

View file

@ -54,6 +54,7 @@ pub(crate) fn narrowing_constraint<'db>(
}
}
#[allow(clippy::ref_option)]
#[salsa::tracked(return_ref)]
fn all_narrowing_constraints_for_pattern<'db>(
db: &'db dyn Db,
@ -62,6 +63,7 @@ fn all_narrowing_constraints_for_pattern<'db>(
NarrowingConstraintsBuilder::new(db, ConstraintNode::Pattern(pattern), true).finish()
}
#[allow(clippy::ref_option)]
#[salsa::tracked(return_ref)]
fn all_narrowing_constraints_for_expression<'db>(
db: &'db dyn Db,
@ -70,6 +72,7 @@ fn all_narrowing_constraints_for_expression<'db>(
NarrowingConstraintsBuilder::new(db, ConstraintNode::Expression(expression), true).finish()
}
#[allow(clippy::ref_option)]
#[salsa::tracked(return_ref)]
fn all_negative_narrowing_constraints_for_expression<'db>(
db: &'db dyn Db,