| Age | Commit message (Collapse) | Author | Lines |
|
manual impl was a workaround for #28229.
|
|
|
|
|
|
- Cleanup the `impl PartialEq<BookFormat> for Book` implementation
- Implement `impl PartialEq<Book> for BookFormat` so it’s symmetric
- Fixes https://github.com/rust-lang/rust/issues/53844.
- Removes the last example since it appears to be redundant with the
previous two examples.
|
|
Rollup of 17 pull requests
Successful merges:
- #57219 (Remove some unused code)
- #57229 (Fix #56806 by using `delay_span_bug` in object safety layout sanity checks)
- #57233 (Rename and fix nolink-with-link-args test)
- #57238 (Fix backtraces for inlined functions on Windows)
- #57249 (Fix broken links to second edition TRPL.)
- #57267 (src/jemalloc is gone, remove its mention from COPYRIGHT)
- #57273 (Update the stdsimd submodule)
- #57278 (Add Clippy to config.toml.example)
- #57295 (Fix 'be be' constructs)
- #57311 (VaList::copy should not require a mutable ref)
- #57312 (`const fn` is no longer coming soon (const keyword docs))
- #57313 (Improve Box<T> -> Pin<Box<T>> conversion)
- #57314 (Fix repeated word typos)
- #57326 (Doc rewording, use the same name `writer`)
- #57338 (rustdoc: force binary filename for compiled doctests)
- #57342 (librustc_mir: Make qualify_min_const_fn module public)
- #57343 (Calculate privacy access only via query)
Failed merges:
- #57340 (Use correct tracking issue for c_variadic)
r? @ghost
|
|
VaList::copy should not require a mutable ref
`VaList::copy` does not need to take a mutable reference. The `va_copy`
intrinsic takes a immutable reference.
|
|
Update the stdsimd submodule
Add a new cmpxchg16b intrinsics for x86_64 and some corrections for ARM/AArch64
|
|
Fix broken links to second edition TRPL.
Fixes https://github.com/rust-lang/rust/issues/57104.
Remove `second-edition/` from TRPL hyperlinks.
|
|
panic when calling MaybeUninhabited::into_inner on uninhabited type
I do this by adding an internal-only intrinsic `panic_if_uninhabited`. I have no idea what I am doing here, just mindlessly copying code around, so please review carefully!
|
|
Index trait
|
|
|
|
VaList::copy does not need to take a mutable reference. The va_copy
intrinsic takes a immutable reference.
|
|
Add a new cmpxchg16b intrinsics for x86_64!
|
|
Fix inconsistent Clone documentation.
Now, arrays of any size Clone if the element type is Clone. So remove the
the document that uses this as an example.
refs #57123
|
|
Fixes https://github.com/rust-lang/rust/issues/57104.
|
|
|
|
Use function pointer as the example to demonstrate how to implement Clone for
Copy types.
refs #57123
|
|
|
|
|
|
|
|
|
|
Make std::cmp::Ord documentation specify what it means to agree with ParitalEq
Resolves #57157
|
|
|
|
|
|
Removed aligned ZST requirement from docs of read_/write_unaligned.
This is just a copy-paste error.
|
|
Fix typo in pin documentation
Affect is a verb, effect is a noun
|
|
This is just a copy-paste error.
|
|
|
|
Affect is a verb, effect is a noun
|
|
|
|
Remove the private generic NonZero<T> wrapper type
Instead, use `#[rustc_layout_scalar_valid_range_start(1)]` directly on relevant libcore types.
|
|
Stabilize Duration::{as_millis, as_micros, as_nanos}
Fixes #50202. :tada:
This is the stabilization PR for the `duration_as_u128` feature. I have never made one of these before so please let me know if I missed a step. I followed the [guide in the Rust Forge](https://forge.rust-lang.org/stabilization-guide.html) and also found some old stabilization PRs ([1](https://github.com/rust-lang/rust/pull/57002), [2](https://github.com/rust-lang/rust/pull/56207)) for similar features to base my work on.
|
|
|
|
Instead, use `#[rustc_layout_scalar_valid_range_start(1)]` directly
on relevant libcore types.
|
|
Add unstable Iterator::copied()
Initially suggested at https://github.com/bluss/rust-itertools/pull/289, however the maintainers of itertools suggested this may be better of in a standard library.
The intent of `copied` is to avoid accidentally cloning iterator elements after doing a code refactoring which causes a structure to be no longer `Copy`. This is a relatively common pattern, as it can be seen by calling `rg --pcre2 '[.]map[(][|](?:(\w+)[|] [*]\1|&(\w+)[|] \2)[)]'` on Rust main repository. Additionally, many uses of `cloned` actually want to simply `Copy`, and changing something to be no longer copyable may introduce unnoticeable performance penalty.
Also, this makes sense because the standard library includes `[T].copy_from_slice` to pair with `[T].clone_from_slice`.
This also adds `Option::copied`, because it makes sense to pair it with `Iterator::copied`. I don't think this feature is particularly important, but it makes sense to update `Option` along with `Iterator` for consistency.
|
|
|
|
trimmed string is returned as a slice instead of a new allocation
Co-Authored-By: matthiaskrgr <matthias.krueger@famsik.de>
|
|
The functions return a reference to a new object and do not modify in-place
as the following code shows:
````
let s = String::from(" hello ");
s.trim();
assert_eq!(s, " hello ");
````
The new reference should be bound to a variable as now indicated by #[must_use].
|
|
|
|
|
|
|
|
Update the stdsimd submodule
This brings in a few updates:
* Update wasm intrinsic naming for atomics
* Update and reimplement most simd128 wasm intrinsics
* Other misc improvements here and there, including a small start to
AVX-512 intrinsics
|
|
Add missing link in docs
r? @steveklabnik
|
|
Pin stabilization
This implements the changes suggested in https://github.com/rust-lang/rust/issues/55766#issue-378417538 and stabilizes the `pin` feature. @alexcrichton also listed several "blockers" in that issue, but then in [this comment](https://github.com/rust-lang/rust/issues/55766#issuecomment-445074980) mentioned that they're more "TODO items":
> In that vein I think it's fine for a stabilization PR to be posted at any time now with FCP lapsed for a week or so now. The final points about self/pin/pinned can be briefly discussed there (if even necessary, they could be left as the proposal above).
Let's settle these last bits here and get this thing stabilized! :)
r? @alexcrichton
cc @withoutboats
|
|
|
|
Changes the original example to use more idiomatic formatting as well
as `.checked_add`. Also adds a second example to show a case where the
`.collect` returns `None`.
|
|
Mem uninit doc ptr drop
Extend the mem::uninitialized documentation to account for partially initialized arrays and how to correctly handle these. These are used in some datastructures (trees for example) or in FFI.
r? @Manishearth
|
|
r=QuietMisdreavus
deny intra-doc link resolution failures in libstd
Fixes #56693.
Until we land a fix for the underlying issue (#56922), we can at least fix the failures in libstd so they don't propagate to downstream crates.
|
|
rename div_euc -> div_euclid, and mod_euc -> rem_euclid
logic is written up in #49048
Also, update the documentation slightly.
cc @alexcrichton @clarcharr @varkor
|
|
Add DoubleEndedIterator::nth_back
As suggested by #54054. This doesn't fix that issue, as this doesn't add enough implementations to optimise that specific use case, but it adds the method and a few (relatively) trivial overrides to work as an initial implementation.
It's probably going to be a lot of work adding `nth_back` implementations everywhere, and I don't have the time to include it all in this commit. But, it's a start. :)
|