Skip to content

Commit

Permalink
Auto merge of #14487 - ehuss:fix-elided-lifetime, r=epage
Browse files Browse the repository at this point in the history
Fix elided lifetime

This fixes an issue with the recent nightly that has added a lint (rust-lang/rust#129207) that warns about the lack of a lifetime, which looks like:

```
warning: elided lifetime has a name
   --> src/cargo/core/workspace.rs:580:66
    |
580 |     pub fn default_members<'a>(&'a self) -> impl Iterator<Item = &Package> {
    |                            -- lifetime `'a` declared here        ^ this elided lifetime gets resolved as `'a`
    |
    = note: `#[warn(elided_named_lifetimes)]` on by default
```
  • Loading branch information
bors committed Sep 2, 2024
2 parents cf88141 + e21f0d0 commit 31a8fbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/core/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ impl<'gctx> Workspace<'gctx> {
}

/// Returns an iterator over default packages in this workspace
pub fn default_members<'a>(&'a self) -> impl Iterator<Item = &Package> {
pub fn default_members<'a>(&'a self) -> impl Iterator<Item = &'a Package> {
let packages = &self.packages;
self.default_members
.iter()
Expand Down

0 comments on commit 31a8fbc

Please sign in to comment.