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

@@ -657,6 +657,7 @@ impl Error {
/// }
/// ```
#[stable(feature = "io_error_inner", since = "1.3.0")]
#[must_use = "`self` will be dropped if the result is not used"]
#[inline]
pub fn into_inner(self) -> Option<Box<dyn error::Error + Send + Sync>> {
match self.repr {