-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-GATsArea: Generic associated types (GATs)Area: Generic associated types (GATs)C-bugCategory: This is a bug.Category: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleF-generic_associated_types`#![feature(generic_associated_types)]` a.k.a. GATs`#![feature(generic_associated_types)]` a.k.a. GATsGATs-triagedIssues using the `generic_associated_types` feature that have been triagedIssues using the `generic_associated_types` feature that have been triagedICEBreaker-Cleanup-CrewHelping to "clean up" bugs with minimal examples and bisectionsHelping to "clean up" bugs with minimal examples and bisectionsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
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>(
- tableau: &mut Tableau<IM, NonArtificial<MP>>,
+pub fn primal<'provider, IM, MP, PR>(
+ tableau: &mut Tableau<IM, NonArtificial<'provider, MP>>,
) -> OptimizationResult<IM::F>
where
- IM: InverseMaintener<F: im_ops::FieldHR + im_ops::Column<<MP::Column as Column>::F>>,
- for<'r> IM::F: im_ops::Cost<MP::Cost<'r>>,
+ IM: InverseMaintener<F:
+ im_ops::FieldHR +
+ im_ops::Column<<MP::Column as Column>::F> +
+ im_ops::Cost<MP::Cost<'provider>> +
+ >,
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.
Metadata
Metadata
Assignees
Labels
A-GATsArea: Generic associated types (GATs)Area: Generic associated types (GATs)C-bugCategory: This is a bug.Category: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleF-generic_associated_types`#![feature(generic_associated_types)]` a.k.a. GATs`#![feature(generic_associated_types)]` a.k.a. GATsGATs-triagedIssues using the `generic_associated_types` feature that have been triagedIssues using the `generic_associated_types` feature that have been triagedICEBreaker-Cleanup-CrewHelping to "clean up" bugs with minimal examples and bisectionsHelping to "clean up" bugs with minimal examples and bisectionsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.