Skip to content

Commit 1792880

Browse files
committed
move IntoFuture ahead of c-compatible ffi types
1 parent 47e373d commit 1792880

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

posts/2022-09-22-Rust-1.64.0.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,6 @@ might come across!
3030

3131
## What's in 1.64.0 stable
3232

33-
### C-compatible FFI types in core and alloc
34-
35-
When calling or being called by C ABIs, Rust code can use type aliases like
36-
`c_uint` or `c_ulong` to match the corresponding types from C on any target,
37-
without requiring target-specific code or conditionals.
38-
39-
Previously, these type aliases were only available in `std`, so code written
40-
for embedded targets and other scenarios that could only use `core` or `alloc`
41-
could not use these types.
42-
43-
Rust 1.64 now provides all of the `c_*` type aliases in
44-
[`core::ffi`](https://doc.rust-lang.org/core/ffi/index.html), as well as
45-
[`core::ffi::CStr`](https://doc.rust-lang.org/core/ffi/struct.CStr.html) for
46-
working with C strings. Rust 1.64 also provides
47-
[`alloc::ffi::CString`](https://doc.rust-lang.org/alloc/ffi/struct.CString.html)
48-
for working with owned C strings using only the `alloc` crate, rather than the
49-
full `std` library.
50-
5133
### Enhancing `.await` with `IntoFuture`
5234

5335
Rust 1.64 stabilizes the
@@ -140,6 +122,24 @@ This should make implementing `IntoFuture` easier by simplifying the type
140122
alias' signature, and make it more performant by removing the `Box` from the
141123
type alias.
142124

125+
### C-compatible FFI types in core and alloc
126+
127+
When calling or being called by C ABIs, Rust code can use type aliases like
128+
`c_uint` or `c_ulong` to match the corresponding types from C on any target,
129+
without requiring target-specific code or conditionals.
130+
131+
Previously, these type aliases were only available in `std`, so code written
132+
for embedded targets and other scenarios that could only use `core` or `alloc`
133+
could not use these types.
134+
135+
Rust 1.64 now provides all of the `c_*` type aliases in
136+
[`core::ffi`](https://doc.rust-lang.org/core/ffi/index.html), as well as
137+
[`core::ffi::CStr`](https://doc.rust-lang.org/core/ffi/struct.CStr.html) for
138+
working with C strings. Rust 1.64 also provides
139+
[`alloc::ffi::CString`](https://doc.rust-lang.org/alloc/ffi/struct.CString.html)
140+
for working with owned C strings using only the `alloc` crate, rather than the
141+
full `std` library.
142+
143143
### Stabilizing `ready!` and `poll_fn`
144144

145145
When working with the low-level details of futures, you'll currently often

0 commit comments

Comments
 (0)