<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/ffi, branch 1.89.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.89.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.89.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-06-23T21:13:20+00:00</updated>
<entry>
<title>Update version placeholders</title>
<updated>2025-06-23T21:13:20+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2025-06-23T17:24:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=36b5dd0de364b0f44733f3778a4fb02f1f84bebd'/>
<id>urn:sha1:36b5dd0de364b0f44733f3778a4fb02f1f84bebd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #137992 - its-the-shrimp:stabilise_os_string_pathbuf_leak, r=dtolnay</title>
<updated>2025-06-07T05:05:44+00:00</updated>
<author>
<name>Jacob Pratt</name>
<email>jacob@jhpratt.dev</email>
</author>
<published>2025-06-07T05:05:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=06a2daf4db450133510b2834f2483a68b026ef2c'/>
<id>urn:sha1:06a2daf4db450133510b2834f2483a68b026ef2c</id>
<content type='text'>
Stabilise `os_string_pathbuf_leak`

This PR stabilises `#[feature(os_string_pathbuf_leak)]`, which defines 2 new methods in the std:

```rs
impl OsString {
    pub fn leak&lt;'a&gt;(self) -&gt; &amp;'a mut OsStr;
}

impl PathBuf {
    pub fn leak&lt;'a&gt;(self) -&gt; &amp;'a mut Path;
}
```

ACP: https://github.com/rust-lang/libs-team/issues/389
Tracking issue: https://github.com/rust-lang/rust/issues/125965
Implementation: https://github.com/rust-lang/rust/pull/125966
</content>
</entry>
<entry>
<title>Rollup merge of #140418 - tgross35:std-c-size_t, r=workingjubilee</title>
<updated>2025-06-06T21:53:15+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2025-06-06T21:53:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3fee6cccde6d1a0f8cabbc40c031ed139df4a888'/>
<id>urn:sha1:3fee6cccde6d1a0f8cabbc40c031ed139df4a888</id>
<content type='text'>
Reexport types from `c_size_t` in `std`

These are unstably available in `core` and should be in `std` too, but are not currently reexported. Resolve this here.

Tracking issue: https://github.com/rust-lang/rust/issues/88345
</content>
</entry>
<entry>
<title>Stabilised `os_string_pathbuf_leak`</title>
<updated>2025-06-06T19:06:42+00:00</updated>
<author>
<name>schvv31n</name>
<email>tim.kurdov@gmail.com</email>
</author>
<published>2025-03-04T21:29:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=eba3a6106728e131286e3751459fccd7594102ef'/>
<id>urn:sha1:eba3a6106728e131286e3751459fccd7594102ef</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #141467 - cyrgani:const-empty-stringlikes, r=Amanieu</title>
<updated>2025-06-04T05:54:33+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-06-04T05:54:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=88620b400e0dceb982af11f2309516ef088cbffa'/>
<id>urn:sha1:88620b400e0dceb982af11f2309516ef088cbffa</id>
<content type='text'>
make `OsString::new` and `PathBuf::new` unstably const

Since #129041, `String::into_bytes` is `const`, which allows making `OsString::new` and `PathBuf::new` unstably const now.
Not sure what the exact process for this is; does it need an ACP?
</content>
</entry>
<entry>
<title>Rollup merge of #140936 - teor2345:wtf-surrogate-docs, r=workingjubilee</title>
<updated>2025-05-26T01:38:17+00:00</updated>
<author>
<name>Jacob Pratt</name>
<email>jacob@jhpratt.dev</email>
</author>
<published>2025-05-26T01:38:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9aae60befc0ebafa21233827d7046187a0396a3d'/>
<id>urn:sha1:9aae60befc0ebafa21233827d7046187a0396a3d</id>
<content type='text'>
Clarify WTF-8 safety docs

This PR is a follow-up to PR #140159, which clarifies ~~two things~~:
- the WTF-8 safety comment [was confusing](https://github.com/rust-lang/rust/pull/140159#discussion_r2082766965), either surrogate condition is actually sufficient for safety, both are not required
- ~~the private `os_str::Slice` type name is easily confused with `std::slice`~~

~~Happy to bikeshed the `OsSlice` name, other alternatives are `OsStrSlice` and `StrSlice`. Now it's got a distinct name from `std::slice`, it's easy to search and replace.~~

cc ``@thaliaarchi`` ``@workingjubilee``
</content>
</entry>
<entry>
<title>make `OsString::new` and `PathBuf::new` unstably const</title>
<updated>2025-05-24T20:33:11+00:00</updated>
<author>
<name>cyrgani</name>
<email>ansgar.w.zielke@gmail.com</email>
</author>
<published>2025-05-24T20:33:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fab206bf5852c532f85b9ad30f9eea8fc952e8e1'/>
<id>urn:sha1:fab206bf5852c532f85b9ad30f9eea8fc952e8e1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #141341 - folkertdev:limit-VaArgSafe-impls, r=workingjubilee</title>
<updated>2025-05-21T20:14:58+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-05-21T20:14:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b9c6b337cec34c71369d3d0df6f91f2032383f20'/>
<id>urn:sha1:b9c6b337cec34c71369d3d0df6f91f2032383f20</id>
<content type='text'>
limit impls of `VaArgSafe` to just types that are actually safe

tracking issue: https://github.com/rust-lang/rust/issues/44930

Retrieving 8- or 16-bit integer arguments from a `VaList` is not safe, because such types are subject to upcasting. See https://github.com/rust-lang/rust/issues/61275#issuecomment-2193942535 for more detail.

This PR also makes the instances of `VaArgSafe` visible in the documentation, and uses a private sealed trait to make sure users cannot create additional impls of `VaArgSafe`, which would almost certainly cause UB.

r? `@workingjubilee`
</content>
</entry>
<entry>
<title>limit impls of `VaArgSafe` to just types that are actually safe</title>
<updated>2025-05-21T13:36:29+00:00</updated>
<author>
<name>Folkert de Vries</name>
<email>folkert@folkertdev.nl</email>
</author>
<published>2025-05-21T12:21:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d8a22a281cc20dc58f1da62be02048622392da05'/>
<id>urn:sha1:d8a22a281cc20dc58f1da62be02048622392da05</id>
<content type='text'>
8 and 16-bit integers are subject to upcasting in C, and hence are not reliably safe. users should perform their own casting and deal with the consequences
</content>
</entry>
<entry>
<title>Rollup merge of #141289 - compiler-errors:more-self, r=jhpratt</title>
<updated>2025-05-20T18:57:28+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-05-20T18:57:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c052d263d067094401852134d372a64adb695e43'/>
<id>urn:sha1:c052d263d067094401852134d372a64adb695e43</id>
<content type='text'>
use `Self` alias in self types rather than manually substituting it

Of the rougly 145 uses of `self: Ty` in the standard library, 5 of them don't use `Self` but instead choose to manually "substitute" the `impl`'s self type into the type.

This leads to weird behavior sometimes (https://github.com/rust-lang/rust/issues/140611#issuecomment-2883761300) -- **to be clear**, none of these usages actually trigger any bugs, but it's possible that they may break in the future (or at least lead to lints), so let's just "fix" them proactively.
</content>
</entry>
</feed>
