@@ -326,7 +326,7 @@ enum GraphNode {
326
326
// risk of being cloned *a lot* so we want to make this as cheap to clone as
327
327
// possible.
328
328
#[ derive( Clone ) ]
329
- struct Context < ' a > {
329
+ struct Context {
330
330
// TODO: Both this and the two maps below are super expensive to clone. We should
331
331
// switch to persistent hash maps if we can at some point or otherwise
332
332
// make these much cheaper to clone in general.
@@ -340,8 +340,6 @@ struct Context<'a> {
340
340
resolve_graph : RcList < GraphNode > ,
341
341
resolve_replacements : RcList < ( PackageId , PackageId ) > ,
342
342
343
- replacements : & ' a [ ( PackageIdSpec , Dependency ) ] ,
344
-
345
343
// These warnings are printed after resolution.
346
344
warnings : RcList < String > ,
347
345
}
@@ -360,7 +358,6 @@ pub fn resolve(summaries: &[(Summary, Method)],
360
358
links : HashMap :: new ( ) ,
361
359
resolve_replacements : RcList :: new ( ) ,
362
360
activations : HashMap :: new ( ) ,
363
- replacements,
364
361
warnings : RcList :: new ( ) ,
365
362
} ;
366
363
let _p = profile:: start ( "resolving" ) ;
@@ -676,9 +673,9 @@ impl<'a> RegistryQueryer<'a> {
676
673
}
677
674
678
675
#[ derive( Clone ) ]
679
- struct BacktrackFrame < ' a > {
676
+ struct BacktrackFrame {
680
677
cur : usize ,
681
- context_backup : Context < ' a > ,
678
+ context_backup : Context ,
682
679
deps_backup : BinaryHeap < DepsFrame > ,
683
680
remaining_candidates : RemainingCandidates ,
684
681
parent : Summary ,
@@ -760,12 +757,12 @@ impl RemainingCandidates {
760
757
///
761
758
/// If all dependencies can be activated and resolved to a version in the
762
759
/// dependency graph, cx.resolve is returned.
763
- fn activate_deps_loop < ' a > (
764
- mut cx : Context < ' a > ,
760
+ fn activate_deps_loop (
761
+ mut cx : Context ,
765
762
registry : & mut RegistryQueryer ,
766
763
summaries : & [ ( Summary , Method ) ] ,
767
764
config : Option < & Config > ,
768
- ) -> CargoResult < Context < ' a > > {
765
+ ) -> CargoResult < Context > {
769
766
// Note that a `BinaryHeap` is used for the remaining dependencies that need
770
767
// activation. This heap is sorted such that the "largest value" is the most
771
768
// constrained dependency, or the one with the least candidates.
@@ -952,9 +949,9 @@ fn activate_deps_loop<'a>(
952
949
/// If the outcome could differ, resets `cx` and `remaining_deps` to that
953
950
/// level and returns the next candidate.
954
951
/// If all candidates have been exhausted, returns None.
955
- fn find_candidate < ' a > (
956
- backtrack_stack : & mut Vec < BacktrackFrame < ' a > > ,
957
- cx : & mut Context < ' a > ,
952
+ fn find_candidate (
953
+ backtrack_stack : & mut Vec < BacktrackFrame > ,
954
+ cx : & mut Context ,
958
955
remaining_deps : & mut BinaryHeap < DepsFrame > ,
959
956
parent : & mut Summary ,
960
957
cur : & mut usize ,
@@ -1278,7 +1275,7 @@ fn build_requirements<'a, 'b: 'a>(s: &'a Summary, method: &'b Method)
1278
1275
Ok ( reqs)
1279
1276
}
1280
1277
1281
- impl < ' a > Context < ' a > {
1278
+ impl Context {
1282
1279
/// Activate this summary by inserting it into our list of known activations.
1283
1280
///
1284
1281
/// Returns true if this summary with the given method is already activated.
0 commit comments