| Age | Commit message (Collapse) | Author | Lines |
|
|
|
char_private.rs is generated programmatically by char_private.py, using data
retrieved from the Unicode Consortium's website.
The motivation here was to make `is_printable` crate-visible (with
`pub(crate)`), but it would seem that the Unicode data has changed slightly
since char_private.rs was last generated.
|
|
This commit updates the bootstrap compiler, bumps the version to 1.23, updates
Cargo, updates books, and updates crates.io dependencies
|
|
Implement Hash for raw pointers to unsized types
This is useful for some niche cases, like a hash table of slices or trait objects where the key is the raw pointer. Example use case: https://docs.rs/by_address
|
|
|
|
Two small enhancements to intrinsics docs
|
|
These functions were deprecated and removed in 1.5, but such simple
functionality shouldn't require using unsafe code, and it isn't
cluttering libstd too much.
|
|
|
|
|
|
|
|
r=QuietMisdreavus
Fix most rendering warnings from switching to CommonMark
There's one big one lift, I'm filing a bug for it soon.
r? @rust-lang/docs
|
|
Update libc and some fixes for x86_64-unknown-linux-gnux32
|
|
|
|
|
|
incr.comp.: Use 128bit SipHash for fingerprinting
This PR switches incr. comp. result fingerprinting from 128 bit BLAKE2 to 128 bit SipHash. When we started using BLAKE2 for fingerprinting, the 128 bit version of SipHash was still experimental. Now that it isn't anymore we should be able to get a nice performance boost without significantly increasing collision probability.
~~I'm going to start a try-build for this, so we can gauge the performance impact before merging (hence the `WIP` in the title).~~
EDIT: Performance improvements look as expected. Tests seem to be passing.
Fixes #41215.
|
|
This just collapses all unit items from an iterator into one. This is
more useful when combined with higher-level abstractions, like
collecting to a `Result<(), E>` where you only care about errors:
```rust
use std::io::*;
data = vec![1, 2, 3, 4, 5];
let res: Result<()> = data.iter()
.map(|x| writeln!(stdout(), "{}", x))
.collect();
assert!(res.is_ok());
```
|
|
address more FIXME whose associated issues were marked as closed
part of #44366
|
|
core: derive Clone for result::IntoIter
It appears to be a simple oversight that `result::IntoIter<T>` doesn't
implement `Clone` (where `T: Clone`). We do already have `Clone` for
`result::Iter`, as well as the similar `option::IntoIter` and `Iter`.
|
|
|
|
|
|
Rollup of 9 pull requests
- Successful merges: #44989, #45005, #45049, #45105, #45121, #45166, #45172, #45190, #45231
- Failed merges: #45138
|
|
Inline eq_slice into str::eq
It's the only use of the function.
|
|
Optimize comparison functions of Iterator
Replaced matching on tuples which led to less performant code generation. Testing on microbenchmarks consistently showed ~1.35x improvement in performance on my machine.
Fixes #44729.
|
|
|
|
Fixes #45197
|
|
The exact semantics of `is_null` on unsized pointers are still debatable,
especially for trait objects. It may be legal to call `*mut self`
methods on a trait object someday, as with Go interfaces, so `is_null`
might need to validate the vtable pointer too.
For `as_ref` and `as_mut`, we're assuming that you cannot have a non-null
data pointer with a null vtable, so casting the unsized check is fine.
|
|
It appears to be a simple oversight that `result::IntoIter<T>` doesn't
implement `Clone` (where `T: Clone`). We do already have `Clone` for
`result::Iter`, as well as the similar `option::IntoIter` and `Iter`.
|
|
Ensure std::mem::Discriminant is Send + Sync
`PhantomData<*const T>` has the implication of Send / Syncness following
the *const T type, but the discriminant should always be Send and Sync.
Use `PhantomData<fn() -> T>` which has the same variance in T, but is Send + Sync
|
|
fmt: misc cleanup
|
|
Add missing links for AtomicBool
r? @rust-lang/docs
|
|
Update trait summaries for std::fmt
This patch is part of #29355.
r? @steveklabnik
|
|
`PhantomData<*const T>` has the implication of Send / Syncness following
the *const T type, but the discriminant should always be Send and Sync.
Use `PhantomData<fn() -> T>` which has the same variance in T, but is Send + Sync
|
|
update FIXME(#6298) to point to open issue 15020
update FIXME(#6268) to point to RFC 811
update FIXME(#10520) to point to RFC 1751
remove FIXME for emscripten issue 4563 and include target in `test_estimate_scaling_factor`
remove FIXME(#18207) since node_id isn't used for `ref` pattern analysis
remove FIXME(#6308) since DST was implemented in #12938
remove FIXME(#2658) since it was decided to not reorganize module
remove FIXME(#20590) since it was decided to stay conservative with projection types
remove FIXME(#20297) since it was decided that solving the issue is unnecessary
remove FIXME(#27086) since closures do correspond to structs now
remove FIXME(#13846) and enable `function_sections` for windows
remove mention of #22079 in FIXME(#22079) since this is a general FIXME
remove FIXME(#5074) since the restriction on borrow were lifted
|
|
|
|
|
|
|
|
|
|
address some FIXME whose associated issues were marked as closed
part of #44366
|
|
This patch is part of #29355.
|
|
|
|
Replaced matching on tuples which led to less performant code generation.
|
|
It's the only use of the function.
|
|
Also fixes some stdlib links to the reference which have changed.
|
|
Docs for size_of::<#[repr(C)]> items.
Most of this info comes from camlorn's blog post on optimizing struct layout and the Rustonomicon.
I don't really like my wording in the first paragraph.
I also cannot find a definition of what `#[repr(C)]` does for enums that have variants with fields. They're allowed, unlike `#[repr(C)] enum`s with no variants.
|
|
|
|
|
|
Rollup of 15 pull requests
- Successful merges: #44124, #44287, #44320, #44694, #44708, #44794, #44797, #44824, #44836, #44840, #44845, #44854, #44889, #44900, #44903
- Failed merges:
|
|
remove FIXME(#13101) since `assert_receiver_is_total_eq` stays.
remove FIXME(#19649) now that stability markers render.
remove FIXME(#13642) now the benchmarks were moved.
remove FIXME(#6220) now that floating points can be formatted.
remove FIXME(#18248) and write tests for `Rc<str>` and `Rc<[u8]>`
remove reference to irelevent issues in FIXME(#1697, #2178...)
update FIXME(#5516) to point to getopts issue 7
update FIXME(#7771) to point to RFC 628
update FIXME(#19839) to point to issue 26925
|
|
Normalize spaces in lang attributes.
So, like, I grepped for all `lang` attributes for *reasons* and I noticed that they all share the same spacing of `#[lang = "item_name"]` except these five instances. So I decided to fix that. So enjoy this PR of exactly ten spaces.
|
|
docs improvement sync::atomic::Atomic*
Addresses the `Atomic*` part of #29377.
r? @steveklabnik
|