Skip to content

Commit 7d1f57a

Browse files
committed
Auto merge of #97841 - nvzqz:inline-encode-wide, r=thomcc
Inline Windows `OsStrExt::encode_wide` User crates currently produce much more code than necessary because the optimizer fails to make assumptions about this method.
2 parents 2682b88 + 246a80c commit 7d1f57a

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)