Skip to content

Commit 246a80c

Browse files
committed
Inline Windows OsStrExt::encode_wide
User crates currently produce much more code than necessary because the optimizer fails to make assumptions about this method.
1 parent 20ad820 commit 246a80c

File tree

1 file changed

+1
-0
lines changed
  • library/std/src/os/windows

1 file changed

+1
-0
lines changed

Diff for: library/std/src/os/windows/ffi.rs

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ pub trait OsStrExt: Sealed {
129129

130130
#[stable(feature = "rust1", since = "1.0.0")]
131131
impl OsStrExt for OsStr {
132+
#[inline]
132133
fn encode_wide(&self) -> EncodeWide<'_> {
133134
self.as_inner().inner.encode_wide()
134135
}

0 commit comments

Comments
 (0)