Skip to content

Commit 4b7eb44

Browse files
cuvipercamelidprogrammerjaketesuji
committed
Apply suggestions from code review
Co-authored-by: Camelid <camelidcamel@gmail.com> Co-authored-by: Jacob Lifshay <programmerjake@gmail.com> Co-authored-by: lzutao <15225902+lzutao@users.noreply.github.com>
1 parent ac77f45 commit 4b7eb44

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

posts/2021-02-11-Rust-1.50.0.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ from the appropriate page on our website, and check out the
2525

2626
## What's in 1.50.0 stable
2727

28-
For this release, we have improved array indexing, expanded union field safety, refined file descriptors, and new library additions.
28+
For this release, we have improved array indexing, expanded union field safety, refined file descriptors, and added to the standard library.
2929
See the [detailed release notes][notes] to learn about other changes
3030
not covered by this post.
3131

@@ -63,7 +63,7 @@ assignments to these fields as well.
6363

6464
### A niche for `File` on Unix platforms
6565

66-
Some types in Rust have specific limitations on what is considered
66+
Some types in Rust have specific limitations on what is considered a
6767
valid value, which may not cover the entire range of possible memory
6868
values. We call any remaining invalid value a [niche], and this space
6969
may be used for type layout optimizations. For example, in Rust 1.28
@@ -75,8 +75,8 @@ file descriptor, and this happens to have a possible niche
7575
as well because it can never be `-1`! System calls which return a file
7676
descriptor use `-1` to indicate that an error occurred (check `errno`)
7777
so it's never possible for `-1` to be a real file descriptor. Starting
78-
in Rust 1.50 this niche is represented to the compiler so it can be
79-
use in layout optimizations too. It follows that `Option<File>` will
78+
in Rust 1.50 this niche is added to the type's definition so it can be
79+
used in layout optimizations too. It follows that `Option<File>` will
8080
now have the same size as `File` itself!
8181

8282
[niche]: https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#niche

0 commit comments

Comments
 (0)