Skip to content

Commit ca35255

Browse files
committed
Auto merge of rust-lang#77517 - JohnTitor:rollup-msbd49e, r=JohnTitor
Rollup of 11 pull requests Successful merges: - rust-lang#75143 (Use `tracing` spans to trace the entire MIR interp stack) - rust-lang#75699 (Uplift drop-bounds lint from clippy) - rust-lang#76768 (Test and reject out-of-bounds shuffle vectors) - rust-lang#77190 (updated p! macro to accept literals) - rust-lang#77388 (Add some regression tests) - rust-lang#77419 (Create E0777 error code for invalid argument in derive) - rust-lang#77447 (BTreeMap: document DrainFilterInner better) - rust-lang#77468 (Fix test name) - rust-lang#77469 (Improve rustdoc error for failed intra-doc link resolution) - rust-lang#77473 (Make --all-targets in x.py check opt-in) - rust-lang#77508 (Fix capitalization in blog post name) Failed merges: r? `@ghost`
2 parents 4d4ea43 + b40a91a commit ca35255

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

alloc/src/collections/btree/map.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,10 +1701,14 @@ where
17011701
/// Most of the implementation of DrainFilter, independent of the type
17021702
/// of the predicate, thus also serving for BTreeSet::DrainFilter.
17031703
pub(super) struct DrainFilterInner<'a, K: 'a, V: 'a> {
1704+
/// Reference to the length field in the borrowed map, updated live.
17041705
length: &'a mut usize,
1705-
// dormant_root is wrapped in an Option to be able to `take` it.
1706+
/// Burried reference to the root field in the borrowed map.
1707+
/// Wrapped in `Option` to allow drop handler to `take` it.
17061708
dormant_root: Option<DormantMutRef<'a, node::Root<K, V>>>,
1707-
// cur_leaf_edge is wrapped in an Option because maps without root lack a leaf edge.
1709+
/// Contains a leaf edge preceding the next element to be returned, or the last leaf edge.
1710+
/// Empty if the map has no root, if iteration went beyond the last leaf edge,
1711+
/// or if a panic occurred in the predicate.
17081712
cur_leaf_edge: Option<Handle<NodeRef<marker::Mut<'a>, K, V, marker::Leaf>, marker::Edge>>,
17091713
}
17101714

core/src/mem/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ pub unsafe fn align_of_val_raw<T: ?Sized>(val: *const T) -> usize {
568568
#[inline]
569569
#[stable(feature = "needs_drop", since = "1.21.0")]
570570
#[rustc_const_stable(feature = "const_needs_drop", since = "1.36.0")]
571+
#[rustc_diagnostic_item = "needs_drop"]
571572
pub const fn needs_drop<T>() -> bool {
572573
intrinsics::needs_drop::<T>()
573574
}

0 commit comments

Comments
 (0)