Not compiling after adding the GAT Self: 'a bounds (original) (raw)

After #89970 was merged, project relp no longer compiled as expected: I needed to add a few Self: 'a bounds.

After I did just that, I was left with the following error:

error[E0477]: the type `RemoveRows<'_, MP>` does not fulfill the required lifetime
  --> src/algorithm/two_phase/mod.rs:57:21
   |
57 |                     phase_two::primal::<_, _, SteepestDescentAlongObjective<_>>(&mut non_artificial)
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0477`.

After I made the following change:

-pub fn primal<IM, MP, PR>(

+pub fn primal<'provider, IM, MP, PR>(

) -> OptimizationResultIM::F where

cargo build succeeded.

The core of this bug report is the question why the extra change above could have been necessary, as #89970 should not have influenced that.

Summarized from a private conversation with @jackh726.