Closed
Description
Given the following code:
#![warn(unused_lifetimes)]
use std::borrow::Cow;
pub async fn do_thing(s: Cow<'_, str>) -> Cow<'_, str> {
s
}
The current output is:
warning: lifetime parameter `'_` never used
--> src/main.rs:5:47
|
5 | pub async fn do_thing(s: Cow<'_, str>) -> Cow<'_, str> {
| -----------------^^
| |
| help: elide the unused lifetime
|
Removing the word async
makes the warning disappear. I am currently running 1.52.1, and this also happens in 1.53.0 on the playground, as well as 1.55.0 nightly on the playground.