Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings with nightly rustc about elided lifetimes having names #9105

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

hlinnaka
Copy link
Contributor

The warnings:

warning: elided lifetime has a name
    --> pageserver/src/metrics.rs:1386:29
     |
1382 |     pub(crate) fn start_timer<'c: 'a, 'a>(
     |                                       -- lifetime `'a` declared here
...
1386 |     ) -> Option<impl Drop + '_> {
     |                             ^^ this elided lifetime gets resolved as `'a`
     |
     = note: `#[warn(elided_named_lifetimes)]` on by default

warning: elided lifetime has a name
    --> pageserver/src/metrics.rs:1537:46
     |
1534 |     pub(crate) fn start_recording<'c: 'a, 'a>(
     |                                           -- lifetime `'a` declared here
...
1537 |     ) -> BasebackupQueryTimeOngoingRecording<'_, '_> {
     |                                              ^^ this elided lifetime gets resolved as `'a`

warning: elided lifetime has a name
    --> pageserver/src/metrics.rs:1537:50
     |
1534 |     pub(crate) fn start_recording<'c: 'a, 'a>(
     |                                           -- lifetime `'a` declared here
...
1537 |     ) -> BasebackupQueryTimeOngoingRecording<'_, '_> {
     |                                                  ^^ this elided lifetime gets resolved as `'a`

warning: elided lifetime has a name
    --> pageserver/src/tenant.rs:3630:25
     |
3622 |     async fn prepare_new_timeline<'a>(
     |                                   -- lifetime `'a` declared here
...
3630 |     ) -> anyhow::Result<UninitializedTimeline> {
     |                         ^^^^^^^^^^^^^^^^^^^^^ this elided lifetime gets resolved as `'a`

…g names

The warnings:

    warning: elided lifetime has a name
        --> pageserver/src/metrics.rs:1386:29
         |
    1382 |     pub(crate) fn start_timer<'c: 'a, 'a>(
         |                                       -- lifetime `'a` declared here
    ...
    1386 |     ) -> Option<impl Drop + '_> {
         |                             ^^ this elided lifetime gets resolved as `'a`
         |
         = note: `#[warn(elided_named_lifetimes)]` on by default

    warning: elided lifetime has a name
        --> pageserver/src/metrics.rs:1537:46
         |
    1534 |     pub(crate) fn start_recording<'c: 'a, 'a>(
         |                                           -- lifetime `'a` declared here
    ...
    1537 |     ) -> BasebackupQueryTimeOngoingRecording<'_, '_> {
         |                                              ^^ this elided lifetime gets resolved as `'a`

    warning: elided lifetime has a name
        --> pageserver/src/metrics.rs:1537:50
         |
    1534 |     pub(crate) fn start_recording<'c: 'a, 'a>(
         |                                           -- lifetime `'a` declared here
    ...
    1537 |     ) -> BasebackupQueryTimeOngoingRecording<'_, '_> {
         |                                                  ^^ this elided lifetime gets resolved as `'a`

    warning: elided lifetime has a name
        --> pageserver/src/tenant.rs:3630:25
         |
    3622 |     async fn prepare_new_timeline<'a>(
         |                                   -- lifetime `'a` declared here
    ...
    3630 |     ) -> anyhow::Result<UninitializedTimeline> {
         |                         ^^^^^^^^^^^^^^^^^^^^^ this elided lifetime gets resolved as `'a`
@hlinnaka hlinnaka requested a review from a team as a code owner September 23, 2024 15:27
@hlinnaka hlinnaka requested a review from skyzh September 23, 2024 15:27
Copy link

github-actions bot commented Sep 23, 2024

5029 tests run: 4865 passed, 0 failed, 164 skipped (full report)


Flaky tests (5)

Postgres 17

Code coverage* (full report)

  • functions: 32.1% (7447 of 23213 functions)
  • lines: 49.9% (59952 of 120174 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
5bd58bc at 2024-09-23T21:04:38.033Z :recycle:

@arpad-m arpad-m merged commit e7e6319 into main Sep 23, 2024
82 checks passed
@arpad-m arpad-m deleted the fix-nightly-lifetime-warnings branch September 23, 2024 21:31
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.

3 participants