| Age | Commit message (Collapse) | Author | Lines |
|
Miri now supports entropy, but is still slow
Adjust the `cfg` and their comments in the test suites accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
improve docs for std::hint::unreachable_unchecked()
Fixes #59549
|
|
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
|
|
Spead the knowledge of `to_ne_bytes` functions existence.
|
|
r=RalfJung
Remove [mut] syntax in pin docs
Resolves #59832
|
|
|
|
|
|
|
|
Fix paste error in split_ascii_whitespace docs.
It was accidentally still testing the unicode version, `split_whitespace`.
|
|
MaybeUninit: remove deprecated functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Final (one can only hope) futures_api adjustments
Based on https://github.com/rust-lang/rust/pull/59119 -- this change is only the latter two commits.
cc https://github.com/rust-lang/rust/issues/59725
r? @withoutboats
|
|
|
|
Remove note about transmute for float bitpatterns.
This particular usecase has been safely abstracted in these `std` functions: [f32::to_bits](https://doc.rust-lang.org/std/primitive.f32.html#method.to_bits), [f32::from_bits](https://doc.rust-lang.org/std/primitive.f32.html#method.from_bits), [f64::to_bits](https://doc.rust-lang.org/std/primitive.f64.html#method.to_bits), [f64::from_bits](https://doc.rust-lang.org/std/primitive.f64.html#method.from_bits). So, I think we shouldn't recommend an unnecessary use of `unsafe` here anymore.
|
|
std::ops::Div examples: correct nominator to numerator
|
|
Remove strange formatting in `Ordering` docs.
I can't really fathom what the intent of the brackets is. The [original PR](#12956) doesn't give any hints. I think it seems fine without them.
|
|
|
|
|
|
|
|
|
|
Introduce RefCell::try_borrow_unguarded
*Come sit next to the fireplace with me, this is going to be a long story.*
So, you may already be aware that Servo has weird design constraints that forces us developers working on it to do weird things. The thing that interests us today is that we do layout on a separate thread with its own thread pool to do some things in parallel, whereas the data it uses comes from the script thread, which implements the entire DOM and related pieces, with `!Sync` data types such as `RefCell<T>`.
The invariant we maintain is that script does not do anything ever with the DOM data as long as layout is doing its job. That's all nice and all, but one thing we don't ensure is that we don't actually know if script was currently mutably borrowing some `RefCell<T>` prior to starting layout, which may lead to aliasing mutable memory and obviously undefined behaviour.
This PR reinstates `RefCell::borrow_state` so that [this method](https://github.com/servo/servo/blob/master/components/script/dom/bindings/cell.rs#L23-L30) can make use of it and return `None` if the cell was mutably borrowed.
Cc @SimonSapin
|
|
|
|
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
|
|
|
|
|
|
|
|
|
|
Future-proof the Futures API
cc https://github.com/rust-lang/rust/issues/59113, @carllerche, @rust-lang/libs
r? @withoutboats
|
|
|
|
Add missing tryfrom example
r? @rust-lang/docs
|
|
|
|
|
|
|
|
This commit changes the behavior of Formatter::debug_struct,
debug_tuple, debug_list, debug_set, and debug_map to render trailing
commas in {:#?} mode, which is the dominant style in modern Rust code.
Before:
Language {
name: "Rust",
trailing_commas: false
}
After:
Language {
name: "Rust",
trailing_commas: true,
}
|
|
|
|
Forward formatter settings to bounds of `Range<T>` in `fmt::Debug` impl
Before this change, formatter settings were lost when printing a `Range`. For example, printing a `Range<f32>` with `{:.2?}` would not apply the precision modifier when printing the floats. Now the `Debug` impls look a bit more verbose, but modifier are not lost.
---
I assume the exact output of `Debug` impls in `std` cannot be relied on by users and thus can change, right?
|
|
Updated the documentation of spin_loop and spin_loop_hint
# Description
- Updated the description of `core::hints::spin_loop`
- Updated the description of `core::async::spin_loop_hint`
Both documentation is rewritten to better reflect when one should prefer using a busy-wait spin-loop (and the `spin_loop` and `spin_loop_hint` functions) over `yield_now`. It also dives a little bit deeper on what the function actually does.
closes #55418
|