Skip to content

Fix warning about hidden elided lifetime in Drain#305

Merged
bluss merged 1 commit intobluss:masterfrom
niklasf:elided-drain-lifetime
May 3, 2026
Merged

Fix warning about hidden elided lifetime in Drain#305
bluss merged 1 commit intobluss:masterfrom
niklasf:elided-drain-lifetime

Conversation

@niklasf
Copy link
Copy Markdown
Contributor

@niklasf niklasf commented Dec 16, 2025

warning: hiding a lifetime that's elided elsewhere is confusing
   --> src/arrayvec.rs:640:21
    |
640 |     pub fn drain<R>(&mut self, range: R) -> Drain<T, CAP>
    |                     ^^^^^^^^^               ^^^^^^^^^^^^^ the same lifetime is hidden here
    |                     |
    |                     the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
    |
640 |     pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, CAP>
    |                                                   +++

@bluss
Copy link
Copy Markdown
Owner

bluss commented May 3, 2026

thank you

@bluss bluss merged commit 1bc606d into bluss:master May 3, 2026
7 checks passed
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.

2 participants