Add #[must_use] to conversions that move self

This commit is contained in:
John Kugelman
2021-10-10 19:50:52 -04:00
parent 6928fafe06
commit b115781bcd
19 changed files with 54 additions and 11 deletions

View File

@@ -883,6 +883,7 @@ impl TcpListener {
/// Ok(())
/// }
/// ```
#[must_use = "`self` will be dropped if the result is not used"]
#[unstable(feature = "tcplistener_into_incoming", issue = "88339")]
pub fn into_incoming(self) -> IntoIncoming {
IntoIncoming { listener: self }