Add #[inline] to functions that are never called

This commit is contained in:
Gary Guo
2023-04-06 23:42:38 +01:00
parent 8660707bb2
commit 8bafcdeac3
6 changed files with 9 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ impl From<Infallible> for TryFromIntError {
#[unstable(feature = "never_type", issue = "35121")]
impl From<!> for TryFromIntError {
#[inline]
fn from(never: !) -> TryFromIntError {
// Match rather than coerce to make sure that code like
// `From<Infallible> for TryFromIntError` above will keep working