| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
allow multiple args to `dbg!(..)`
This closes #59763
|
|
|
|
RFC 4291 is a little unclear about what is a unicast link local address.
According to section 2.4, the entire fe80::/10 range is reserved for
these addresses, but section 2.5.3 defines a stricter format for such
addresses.
After a discussion[0] is has been decided to add a different method for
each definition, so this commit:
- renames is_unicast_link_local() into is_unicast_link_local_strict()
- relaxed the check in is_unicast_link_local()
[0]: https://github.com/rust-lang/rust/issues/27709#issuecomment-400370706
|
|
- quote the RFC
- add a link to the RFC
- fix markdown
|
|
|
|
DoubleEndedIterators.
r?Manishearth
|
|
|
|
sync_all should flush all metadata in macos/ios, so it should call
fcntl with the F_FULLFSYNC flag as sync_data does.
Fixes #55920
|
|
Use more realistic example for thread builder
Stack size of 10 **bytes** does not make any sense: the minimal possible stack size is greater anyway.
|
|
Simplify the returning of a Result a bit
|
|
Stack size of 10 **bytes** does not make any sense: the minimal possible stack size is greater anyway.
|
|
|
|
Remove collection-specific `with_capacity` documentation from `std::collections`
Fixes #59931
The style of `std::collections` module doc is very much a beginner friendly guide, and documenting niche, collection-specific behaviour feels out of place, if not brittle.
The note about `VecDeque` is outdated (see issue), and while `Vec` probably won't change its guarantees any time soon, the users who are interested in its allocation properties will find that in its own documentation.
|
|
Previously there wasn't any documentation to show what the type of
`Item` was inside `std::env::SplitPaths`. Now, in the same format as
other examples of docs in `srd` for `Iterator#Item`, we mention the
type.
This fixes #59543.
|
|
|
|
|
|
bump stdsimd; make intra_doc_link_resolution_failure an error again; make lints more consistent
I made `intra_doc_link_resolution_failure` warn so that it would properly respect `deny-warnings = false` in `config.toml`. `#[warn]` still become errors with `-D warnings` so I thought this was fine.
Turns out however that we don't pass `-D warnings` when running rustdoc, so for additional rustdoc-lints we need to set them to `deny`.
Also sue the opportunity to make the lint flags more consistent between libcore, liballoc, libstd.
Cc @gnzlbg for the *big* stdsimd update.
|
|
Add must_use annotations to Result::is_ok and is_err
Discussed in #59610
|
|
Fixes #59931
|
|
Make BufWriter use get_mut instead of manipulating inner in Write implementation
`get_mut` allows us to abstract over the implementation detail of inner being optional.
|
|
|
|
std: Add `{read,write}_vectored` for more types
This commit implements the `{read,write}_vectored` methods on more types
in the standard library, namely:
* `std::fs::File`
* `std::process::ChildStd{in,out,err}`
* `std::io::Std{in,out,err}`
* `std::io::Std{in,out,err}Lock`
* `std::io::Std{in,out,err}Raw`
Where supported the OS implementations hook up to native support,
otherwise it falls back to the already-defaulted implementation.
|
|
Re-export NonZero signed variant in std
Closes #59834 .
|
|
Fix links on keyword docs.
- Make links relative.
- Adjust links from old 2018-edition book.
- Fix broken link in `let` docs.
|
|
Eliminate `FnBox` usages from libstd.
|
|
Stabilize the `alloc` crate.
This implements RFC 2480:
* https://github.com/rust-lang/rfcs/pull/2480
* https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md
Closes https://github.com/rust-lang/rust/issues/27783
|
|
Impl RawFd conversion traits for WASI TcpListener, TcpStream and UdpSocket
r? @alexcrichton
|
|
This implements RFC 2480:
* https://github.com/rust-lang/rfcs/pull/2480
* https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md
Closes https://github.com/rust-lang/rust/issues/27783
|
|
get_mut allows us to abstract over the implementation detail of inner being
optional.
|
|
|
|
|
|
This commit implements the `{read,write}_vectored` methods on more types
in the standard library, namely:
* `std::fs::File`
* `std::process::ChildStd{in,out,err}`
* `std::io::Std{in,out,err}`
* `std::io::Std{in,out,err}Lock`
* `std::io::Std{in,out,err}Raw`
Where supported the OS implementations hook up to native support,
otherwise it falls back to the already-defaulted implementation.
|
|
Use dbg! recursively on each item
Co-Authored-By: llogiq <bogusandre@gmail.com>
|
|
|
|
|
|
|
|
- Make links relative.
- Adjust links from old 2018-edition book.
- Fix broken link in `let` docs.
|
|
|
|
Add reference to cfg attr
r? @QuietMisdreavus
|
|
Future-proof the Futures API
cc https://github.com/rust-lang/rust/issues/59113, @carllerche, @rust-lang/libs
r? @withoutboats
|
|
|
|
Use for_each to extend collections
This updates the `Extend` implementations to use `for_each` for many
collections: `BinaryHeap`, `BTreeMap`, `BTreeSet`, `LinkedList`, `Path`,
`TokenStream`, `VecDeque`, and `Wtf8Buf`.
Folding with `for_each` enables better performance than a `for`-loop for
some iterators, especially if they can just forward to internal
iterators, like `Chain` and `FlatMap` do.
|
|
|
|
wasi: Use shared API for preopened fds
This commit updates the wasi target with supported added in
CraneStation/wasi-sysroot#10. That function allows both C and Rust to
cooperate in how preopened files are managed, enabling us to learn about
propened files through the same interface. The `open_parent` function in
the wasi `fs` module was updated to avoid its own initialization of a
global preopened map and instead delegate to libc to perform this
functionality.
This should both be more robust into the future in terms of handling
path logic as well as ensuring the propened map is correctly set up at
process boot time. This does currently require some unfortunate
allocations on our side, but if that becomes an issue we can always
paper over those in time!
|
|
SGX target: Use linker option to avoid code CGU assignment kludge
cc @VardhanThigle @faern
|