Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 8, 2025

Where a type being returned by a function has lifetimes, specify them with '_ instead of omitting them entirely. Cow<str> -> Cow<'_, str>.

This is split out from Rust upgrade PR #12873, so can see the diff in that PR more clearly.

Note: This is very slightly different from what was in #12873. Clippy auto-fix introduced a couple of unnecessary and weird-looking anonymous lifetimes in function params, which this PR skips.

@github-actions github-actions bot added A-linter Area - Linter A-semantic Area - Semantic A-cli Area - CLI A-ast Area - AST A-transformer Area - Transformer / Transpiler A-ast-tools Area - AST tools A-formatter Area - Formatter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Aug 8, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel changed the title refactor(all): add missing lifetimes in function params refactor(all): add missing lifetimes in function return types Aug 8, 2025
@overlookmotel overlookmotel marked this pull request as ready for review August 8, 2025 08:36
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 8, 2025

CodSpeed Instrumentation Performance Report

Merging #12895 will not alter performance

Comparing 08-08-refactor_all_add_missing_lifetimes_in_function_params (c072e01) with main (9e3963f)

Summary

✅ 34 untouched benchmarks

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Aug 8, 2025
Copy link
Contributor

camc314 commented Aug 8, 2025

Merge activity

Where a type being returned by a function has lifetimes, specify them with `'_` instead of omitting them entirely. `Cow<str>` -> `Cow<'_, str>`.

This is split out from Rust upgrade PR #12873, so can see the diff in that PR more clearly.

Note: This is very slightly different from what was in #12873. Clippy auto-fix introduced a couple of unnecessary and weird-looking anonymous lifetimes in function params, which this PR skips.
@graphite-app graphite-app bot force-pushed the 08-08-refactor_all_add_missing_lifetimes_in_function_params branch from ca10b49 to c072e01 Compare August 8, 2025 08:40
@graphite-app graphite-app bot merged commit c072e01 into main Aug 8, 2025
31 checks passed
@graphite-app graphite-app bot deleted the 08-08-refactor_all_add_missing_lifetimes_in_function_params branch August 8, 2025 08:46
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 8, 2025
This was referenced Aug 9, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Aug 12, 2025
…oject#12895)

Where a type being returned by a function has lifetimes, specify them with `'_` instead of omitting them entirely. `Cow<str>` -> `Cow<'_, str>`.

This is split out from Rust upgrade PR oxc-project#12873, so can see the diff in that PR more clearly.

Note: This is very slightly different from what was in oxc-project#12873. Clippy auto-fix introduced a couple of unnecessary and weird-looking anonymous lifetimes in function params, which this PR skips.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST A-ast-tools Area - AST tools A-cli Area - CLI A-formatter Area - Formatter A-linter Area - Linter A-semantic Area - Semantic A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants