|
11 | 11 | use std::iter;
|
12 | 12 |
|
13 | 13 | use hir_ty::TyBuilder;
|
14 |
| -use hir_ty::db::HirDatabase; |
15 | 14 | use hir_ty::mir::BorrowKind;
|
16 | 15 | use itertools::Itertools;
|
17 | 16 | use rustc_hash::FxHashSet;
|
@@ -40,8 +39,8 @@ use super::{LookupTable, NewTypesKey, TermSearchCtx};
|
40 | 39 | ///
|
41 | 40 | /// _Note that there is no use of calling this tactic in every iteration as the output does not
|
42 | 41 | /// depend on the current state of `lookup`_
|
43 |
| -pub(super) fn trivial<'a, DB: HirDatabase>( |
44 |
| - ctx: &'a TermSearchCtx<'a, DB>, |
| 42 | +pub(super) fn trivial<'a>( |
| 43 | + ctx: &'a TermSearchCtx<'a>, |
45 | 44 | defs: &'a FxHashSet<ScopeDef>,
|
46 | 45 | lookup: &'a mut LookupTable,
|
47 | 46 | ) -> impl Iterator<Item = Expr> + 'a {
|
@@ -104,8 +103,8 @@ pub(super) fn trivial<'a, DB: HirDatabase>(
|
104 | 103 | ///
|
105 | 104 | /// _Note that there is no use of calling this tactic in every iteration as the output does not
|
106 | 105 | /// depend on the current state of `lookup`_
|
107 |
| -pub(super) fn assoc_const<'a, DB: HirDatabase>( |
108 |
| - ctx: &'a TermSearchCtx<'a, DB>, |
| 106 | +pub(super) fn assoc_const<'a>( |
| 107 | + ctx: &'a TermSearchCtx<'a>, |
109 | 108 | defs: &'a FxHashSet<ScopeDef>,
|
110 | 109 | lookup: &'a mut LookupTable,
|
111 | 110 | ) -> impl Iterator<Item = Expr> + 'a {
|
@@ -152,8 +151,8 @@ pub(super) fn assoc_const<'a, DB: HirDatabase>(
|
152 | 151 | /// * `defs` - Set of items in scope at term search target location
|
153 | 152 | /// * `lookup` - Lookup table for types
|
154 | 153 | /// * `should_continue` - Function that indicates when to stop iterating
|
155 |
| -pub(super) fn data_constructor<'a, DB: HirDatabase>( |
156 |
| - ctx: &'a TermSearchCtx<'a, DB>, |
| 154 | +pub(super) fn data_constructor<'a>( |
| 155 | + ctx: &'a TermSearchCtx<'a>, |
157 | 156 | _defs: &'a FxHashSet<ScopeDef>,
|
158 | 157 | lookup: &'a mut LookupTable,
|
159 | 158 | should_continue: &'a dyn std::ops::Fn() -> bool,
|
@@ -301,8 +300,8 @@ pub(super) fn data_constructor<'a, DB: HirDatabase>(
|
301 | 300 | /// * `defs` - Set of items in scope at term search target location
|
302 | 301 | /// * `lookup` - Lookup table for types
|
303 | 302 | /// * `should_continue` - Function that indicates when to stop iterating
|
304 |
| -pub(super) fn free_function<'a, DB: HirDatabase>( |
305 |
| - ctx: &'a TermSearchCtx<'a, DB>, |
| 303 | +pub(super) fn free_function<'a>( |
| 304 | + ctx: &'a TermSearchCtx<'a>, |
306 | 305 | defs: &'a FxHashSet<ScopeDef>,
|
307 | 306 | lookup: &'a mut LookupTable,
|
308 | 307 | should_continue: &'a dyn std::ops::Fn() -> bool,
|
@@ -432,8 +431,8 @@ pub(super) fn free_function<'a, DB: HirDatabase>(
|
432 | 431 | /// * `defs` - Set of items in scope at term search target location
|
433 | 432 | /// * `lookup` - Lookup table for types
|
434 | 433 | /// * `should_continue` - Function that indicates when to stop iterating
|
435 |
| -pub(super) fn impl_method<'a, DB: HirDatabase>( |
436 |
| - ctx: &'a TermSearchCtx<'a, DB>, |
| 434 | +pub(super) fn impl_method<'a>( |
| 435 | + ctx: &'a TermSearchCtx<'a>, |
437 | 436 | _defs: &'a FxHashSet<ScopeDef>,
|
438 | 437 | lookup: &'a mut LookupTable,
|
439 | 438 | should_continue: &'a dyn std::ops::Fn() -> bool,
|
@@ -547,8 +546,8 @@ pub(super) fn impl_method<'a, DB: HirDatabase>(
|
547 | 546 | /// * `defs` - Set of items in scope at term search target location
|
548 | 547 | /// * `lookup` - Lookup table for types
|
549 | 548 | /// * `should_continue` - Function that indicates when to stop iterating
|
550 |
| -pub(super) fn struct_projection<'a, DB: HirDatabase>( |
551 |
| - ctx: &'a TermSearchCtx<'a, DB>, |
| 549 | +pub(super) fn struct_projection<'a>( |
| 550 | + ctx: &'a TermSearchCtx<'a>, |
552 | 551 | _defs: &'a FxHashSet<ScopeDef>,
|
553 | 552 | lookup: &'a mut LookupTable,
|
554 | 553 | should_continue: &'a dyn std::ops::Fn() -> bool,
|
@@ -589,8 +588,8 @@ pub(super) fn struct_projection<'a, DB: HirDatabase>(
|
589 | 588 | /// * `ctx` - Context for the term search
|
590 | 589 | /// * `defs` - Set of items in scope at term search target location
|
591 | 590 | /// * `lookup` - Lookup table for types
|
592 |
| -pub(super) fn famous_types<'a, DB: HirDatabase>( |
593 |
| - ctx: &'a TermSearchCtx<'a, DB>, |
| 591 | +pub(super) fn famous_types<'a>( |
| 592 | + ctx: &'a TermSearchCtx<'a>, |
594 | 593 | _defs: &'a FxHashSet<ScopeDef>,
|
595 | 594 | lookup: &'a mut LookupTable,
|
596 | 595 | ) -> impl Iterator<Item = Expr> + 'a {
|
@@ -620,8 +619,8 @@ pub(super) fn famous_types<'a, DB: HirDatabase>(
|
620 | 619 | /// * `defs` - Set of items in scope at term search target location
|
621 | 620 | /// * `lookup` - Lookup table for types
|
622 | 621 | /// * `should_continue` - Function that indicates when to stop iterating
|
623 |
| -pub(super) fn impl_static_method<'a, DB: HirDatabase>( |
624 |
| - ctx: &'a TermSearchCtx<'a, DB>, |
| 622 | +pub(super) fn impl_static_method<'a>( |
| 623 | + ctx: &'a TermSearchCtx<'a>, |
625 | 624 | _defs: &'a FxHashSet<ScopeDef>,
|
626 | 625 | lookup: &'a mut LookupTable,
|
627 | 626 | should_continue: &'a dyn std::ops::Fn() -> bool,
|
@@ -722,8 +721,8 @@ pub(super) fn impl_static_method<'a, DB: HirDatabase>(
|
722 | 721 | /// * `defs` - Set of items in scope at term search target location
|
723 | 722 | /// * `lookup` - Lookup table for types
|
724 | 723 | /// * `should_continue` - Function that indicates when to stop iterating
|
725 |
| -pub(super) fn make_tuple<'a, DB: HirDatabase>( |
726 |
| - ctx: &'a TermSearchCtx<'a, DB>, |
| 724 | +pub(super) fn make_tuple<'a>( |
| 725 | + ctx: &'a TermSearchCtx<'a>, |
727 | 726 | _defs: &'a FxHashSet<ScopeDef>,
|
728 | 727 | lookup: &'a mut LookupTable,
|
729 | 728 | should_continue: &'a dyn std::ops::Fn() -> bool,
|
|
0 commit comments