Skip to content

Rollup of 5 pull requests #136272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 39 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5be02d6
Add `@bors rollup=never` to rustc-push PR body
Kobzol Jan 21, 2025
0974081
Merge pull request #2217 from Kobzol/bors-rollup-never
jieyouxu Jan 21, 2025
6b48b67
optimize slice::ptr_rotate for compile-time-constant small rotates
edwloef Jan 21, 2025
353d916
Revert "Add `@bors rollup=never` to rustc-push PR body"
Kobzol Jan 24, 2025
17a14b6
fix(solve/significant-changes): typo
ada4a Jan 24, 2025
93d73d3
Merge pull request #2220 from rust-lang/revert-2217-bors-rollup-never
jieyouxu Jan 24, 2025
bda5664
Merge pull request #2221 from ada4a/patch-1
JohnTitor Jan 25, 2025
1392e07
CI: use key-restore for cache GH action
marxin Jan 25, 2025
40e051f
Update boring lines to sync with rustdoc
ehuss Jan 25, 2025
20818c4
Remove accidental leading empty line in code block
fmease Jan 26, 2025
c8ed8d4
Merge pull request #2224 from ehuss/rustdoc-boring
fmease Jan 26, 2025
5210a8d
Correct information on dylib compression
ehuss Jan 26, 2025
f6bd61a
Merge pull request #2225 from ehuss/patch-3
tshepang Jan 26, 2025
885641b
Merge pull request #2223 from marxin/CI-cache-restore-key
camelid Jan 26, 2025
2412289
Fix rustc-pull CI's bash commands
Kobzol Jan 27, 2025
3d4b24a
Merge pull request #2226 from Kobzol/rustc-pull-ci-bash
jieyouxu Jan 28, 2025
d63796f
Update about-this-guide.md
Joren-vanGoethem Jan 28, 2025
62102ee
Preparing for merge from rustc
BoxyUwU Jan 28, 2025
815c5d4
Merge from rustc
BoxyUwU Jan 28, 2025
5861aa2
Add some extra pointers for rustdoc frontend devs
notriddle Jan 28, 2025
6763561
btree/node.rs: remove incorrect comment from pop_internal_level docs
btj Jan 28, 2025
941ab8c
Add "Writing tests" section
yegeunyang Jan 29, 2025
0127e64
Add link to declare_lint! macro
yegeunyang Jan 29, 2025
8520031
Merge pull request #2229 from notriddle/typescript
jieyouxu Jan 29, 2025
d8cca31
Merge pull request #2232 from yegeunyang/#2114
jieyouxu Jan 29, 2025
4260e3a
Touch up a sentence
yegeunyang Jan 29, 2025
7fa9822
Merge pull request #2231 from yegeunyang/#2069
jieyouxu Jan 29, 2025
bec4359
Merge pull request #2227 from Joren-vanGoethem/master
jieyouxu Jan 29, 2025
810e4c1
btree/node.rs: pop_internal_level: does not invalidate other handles
btj Jan 29, 2025
2f276b3
spastorino back from vacations
spastorino Jan 29, 2025
0b48908
Rustc pull
BoxyUwU Jan 29, 2025
311c3b7
split slice::ptr_rotate into three separate algorithms, to hopefully …
edwloef Jan 27, 2025
fb3d1d0
add inline attribute and codegen test
edwloef Jan 28, 2025
52519e1
Cleanup docs for Allocator
hkBst Jan 29, 2025
6ebe590
Rollup merge of #135847 - edwloef:slice_ptr_rotate_opt, r=scottmcm
Zalathar Jan 30, 2025
3a2f26f
Rollup merge of #136215 - btj:patch-1, r=cuviper
Zalathar Jan 30, 2025
068f322
Rollup merge of #136252 - spastorino:remove-spastorino-on-vacations, …
Zalathar Jan 30, 2025
48b3eca
Rollup merge of #136254 - BoxyUwU:rdg-push, r=Kobzol
Zalathar Jan 30, 2025
4059a79
Rollup merge of #136259 - hkBst:patch-30, r=thomcc
Zalathar Jan 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/alloc/src/collections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,8 @@ impl<K, V> NodeRef<marker::Owned, K, V, marker::LeafOrInternal> {
/// no cleanup is done on any of the keys, values and other children.
/// This decreases the height by 1 and is the opposite of `push_internal_level`.
///
/// Requires exclusive access to the `NodeRef` object but not to the root node;
/// it will not invalidate other handles or references to the root node.
/// Does not invalidate any handles or references pointing into the subtree
/// rooted at the first child of `self`.
///
/// Panics if there is no internal level, i.e., if the root node is a leaf.
pub(super) fn pop_internal_level<A: Allocator + Clone>(&mut self, alloc: A) {
Expand Down
58 changes: 27 additions & 31 deletions library/core/src/alloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,26 @@ impl fmt::Display for AllocError {
/// An implementation of `Allocator` can allocate, grow, shrink, and deallocate arbitrary blocks of
/// data described via [`Layout`][].
///
/// `Allocator` is designed to be implemented on ZSTs, references, or smart pointers because having
/// an allocator like `MyAlloc([u8; N])` cannot be moved, without updating the pointers to the
/// `Allocator` is designed to be implemented on ZSTs, references, or smart pointers.
/// An allocator for `MyAlloc([u8; N])` cannot be moved, without updating the pointers to the
/// allocated memory.
///
/// Unlike [`GlobalAlloc`][], zero-sized allocations are allowed in `Allocator`. If an underlying
/// allocator does not support this (like jemalloc) or return a null pointer (such as
/// `libc::malloc`), this must be caught by the implementation.
/// In contrast to [`GlobalAlloc`][], `Allocator` allows zero-sized allocations. If an underlying
/// allocator does not support this (like jemalloc) or responds by returning a null pointer
/// (such as `libc::malloc`), this must be caught by the implementation.
///
/// ### Currently allocated memory
///
/// Some of the methods require that a memory block be *currently allocated* via an allocator. This
/// means that:
/// Some of the methods require that a memory block is *currently allocated* by an allocator.
/// This means that:
/// * the starting address for that memory block was previously
/// returned by [`allocate`], [`grow`], or [`shrink`], and
/// * the memory block has not subsequently been deallocated.
///
/// * the starting address for that memory block was previously returned by [`allocate`], [`grow`], or
/// [`shrink`], and
///
/// * the memory block has not been subsequently deallocated, where blocks are either deallocated
/// directly by being passed to [`deallocate`] or were changed by being passed to [`grow`] or
/// [`shrink`] that returns `Ok`. If `grow` or `shrink` have returned `Err`, the passed pointer
/// remains valid.
/// A memory block is deallocated by a call to [`deallocate`],
/// or by a call to [`grow`] or [`shrink`] that returns `Ok`.
/// A call to `grow` or `shrink` that returns `Err`,
/// does not deallocate the memory block passed to it.
///
/// [`allocate`]: Allocator::allocate
/// [`grow`]: Allocator::grow
Expand All @@ -77,32 +77,28 @@ impl fmt::Display for AllocError {
///
/// ### Memory fitting
///
/// Some of the methods require that a layout *fit* a memory block. What it means for a layout to
/// "fit" a memory block means (or equivalently, for a memory block to "fit" a layout) is that the
/// Some of the methods require that a `layout` *fit* a memory block or vice versa. This means that the
/// following conditions must hold:
///
/// * The block must be allocated with the same alignment as [`layout.align()`], and
///
/// * The provided [`layout.size()`] must fall in the range `min ..= max`, where:
/// - `min` is the size of the layout most recently used to allocate the block, and
/// - `max` is the latest actual size returned from [`allocate`], [`grow`], or [`shrink`].
/// * the memory block must be *currently allocated* with alignment of [`layout.align()`], and
/// * [`layout.size()`] must fall in the range `min ..= max`, where:
/// - `min` is the size of the layout used to allocate the block, and
/// - `max` is the actual size returned from [`allocate`], [`grow`], or [`shrink`].
///
/// [`layout.align()`]: Layout::align
/// [`layout.size()`]: Layout::size
///
/// # Safety
///
/// * Memory blocks returned from an allocator that are [*currently allocated*] must point to
/// valid memory and retain their validity while they are [*currently allocated*] and the shorter
/// of:
/// - the borrow-checker lifetime of the allocator type itself.
/// - as long as at least one of the instance and all of its clones has not been dropped.
/// Memory blocks that are [*currently allocated*] by an allocator,
/// must point to valid memory, and retain their validity while until either:
/// - the memory block is deallocated, or
/// - the allocator is dropped.
///
/// * copying, cloning, or moving the allocator must not invalidate memory blocks returned from this
/// allocator. A copied or cloned allocator must behave like the same allocator, and
/// Copying, cloning, or moving the allocator must not invalidate memory blocks returned from it
/// A copied or cloned allocator must behave like the original allocator.
///
/// * any pointer to a memory block which is [*currently allocated*] may be passed to any other
/// method of the allocator.
/// A memory block which is [*currently allocated*] may be passed to
/// any method of the allocator that accepts such an argument.
///
/// [*currently allocated*]: #currently-allocated-memory
#[unstable(feature = "allocator_api", issue = "32838")]
Expand Down
Loading
Loading