Skip to content

Fix 'unused lifetime parameter' on lifetimes in with<>#36

Open
progval wants to merge 1 commit into
WanderLanz:mainfrom
progval:fix-lt
Open

Fix 'unused lifetime parameter' on lifetimes in with<>#36
progval wants to merge 1 commit into
WanderLanz:mainfrom
progval:fix-lt

Conversation

@progval
Copy link
Copy Markdown
Contributor

@progval progval commented Feb 18, 2026

Without it, code like this:

my_lender.flat_map(lender::covar_mut!(
    #![with<'g, G: SplitLabeling<Label=usize>>]
    for<'lend>
    move |(src, succ): (usize, <<G as SplitLabeling>::SplitLender<'g> as NodeLabelsLender<'lend>>::IntoIterator)|
    -> lender::FromIter<std::vec::IntoIter<(usize, usize)>> {

errors with:

error[E0392]: lifetime parameter `'g` is never used
  --> src/compress/transform.rs:79:41
   |
79 | ...                   #![with<'g, G: SplitLabeling<Label=usize>>]
   |                               ^^ unused lifetime parameter
   |
   = help: consider removing `'g`, referring to it in a field, or using a marker such as `std::marker::PhantomData`

Fixes regression in 8b3c7cd.

Without it, code like this:

```
my_lender.flat_map(lender::covar_mut!(
    #![with<'g, G: SplitLabeling<Label=usize>>]
    for<'lend>
    move |(src, succ): (usize, <<G as SplitLabeling>::SplitLender<'g> as NodeLabelsLender<'lend>>::IntoIterator)|
    -> lender::FromIter<std::vec::IntoIter<(usize, usize)>> {
```

errors with:

```
error[E0392]: lifetime parameter `'g` is never used
  --> src/compress/transform.rs:79:41
   |
79 | ...                   #![with<'g, G: SplitLabeling<Label=usize>>]
   |                               ^^ unused lifetime parameter
   |
   = help: consider removing `'g`, referring to it in a field, or using a marker such as `std::marker::PhantomData`
```

Fixes regression in 8b3c7cd.
swhmirror pushed a commit to SoftwareHeritage/swh-graph that referenced this pull request Feb 19, 2026
lender 0.6.0 has a bug, and our workaround shows a warning with newer versions: WanderLanz/Lender#35
lender 0.6.1 has a regression, which breaks the build: WanderLanz/Lender#36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant