Skip to content

Commit 21a0bda

Browse files
committed
chore: add the use keyword to impl Trait return types in preparation for Rust 2024.
Rust 2024 requires that you specify the generic parameters that are captured by the hidden type represented by `impl Trait`. https://doc.rust-lang.org/std/keyword.use.html#precise-capturing
1 parent 8f32ba3 commit 21a0bda

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ls/src/utils/cst_traversal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ pub fn idents_declared_by_expr(
306306
/// Finds all identifiers declared by a `with` expression.
307307
pub fn idents_declared_by_with(
308308
with_expr: &Node<Immutable>,
309-
) -> impl Iterator<Item = Token<Immutable>> {
309+
) -> impl Iterator<Item = Token<Immutable>> + use<> {
310310
assert_eq!(with_expr.kind(), SyntaxKind::WITH_EXPR);
311311

312312
with_expr
@@ -331,7 +331,7 @@ pub fn idents_declared_by_with(
331331
/// Finds all identifiers declared by a `for` expression.
332332
pub fn idents_declared_by_for(
333333
for_expr: &Node<Immutable>,
334-
) -> impl Iterator<Item = Token<Immutable>> {
334+
) -> impl Iterator<Item = Token<Immutable>> + use<> {
335335
assert_eq!(for_expr.kind(), SyntaxKind::FOR_EXPR);
336336
for_expr
337337
.children_with_tokens()

0 commit comments

Comments
 (0)