Skip to content

Commit af7ab34

Browse files
committedJul 21, 2022
Auto merge of rust-lang#99567 - matthiaskrgr:rollup-08hh3r4, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - rust-lang#98707 (std: use futex-based locks on Fuchsia) - rust-lang#99413 (Add `PhantomData` marker for dropck to `BTreeMap`) - rust-lang#99454 (Add map_continue and continue_value combinators to ControlFlow) - rust-lang#99523 (Fix the stable version of `AsFd for Arc<T>` and `Box<T>`) - rust-lang#99526 (Normalize the arg spans to be within the call span) - rust-lang#99528 (couple of clippy::perf fixes) - rust-lang#99549 (Add regression test for rust-lang#52304) - rust-lang#99552 (Rewrite `orphan_check_trait_ref` to use a `TypeVisitor`) - rust-lang#99557 (Edit `rustc_index::vec::IndexVec::pick3_mut` docs) - rust-lang#99558 (Fix `remap_constness`) - rust-lang#99559 (Remove unused field in ItemKind::KeywordItem) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 1673f14 + af64d93 commit af7ab34

File tree

41 files changed

+577
-344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+577
-344
lines changed
 

‎compiler/rustc_error_messages/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl DiagnosticMessage {
299299
/// - If `self` is non-translatable then return `self`'s message.
300300
pub fn with_subdiagnostic_message(&self, sub: SubdiagnosticMessage) -> Self {
301301
let attr = match sub {
302-
SubdiagnosticMessage::Str(s) => return DiagnosticMessage::Str(s.clone()),
302+
SubdiagnosticMessage::Str(s) => return DiagnosticMessage::Str(s),
303303
SubdiagnosticMessage::FluentIdentifier(id) => {
304304
return DiagnosticMessage::FluentIdentifier(id, None);
305305
}

‎compiler/rustc_index/src/vec.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ impl<I: Idx, T> IndexVec<I, T> {
234234
self.raw.get_mut(index.index())
235235
}
236236

237-
/// Returns mutable references to two distinct elements, a and b. Panics if a == b.
237+
/// Returns mutable references to two distinct elements, `a` and `b`.
238+
///
239+
/// Panics if `a == b`.
238240
#[inline]
239241
pub fn pick2_mut(&mut self, a: I, b: I) -> (&mut T, &mut T) {
240242
let (ai, bi) = (a.index(), b.index());
@@ -249,7 +251,9 @@ impl<I: Idx, T> IndexVec<I, T> {
249251
}
250252
}
251253

252-
/// Returns mutable references to three distinct elements or panics otherwise.
254+
/// Returns mutable references to three distinct elements.
255+
///
256+
/// Panics if the elements are not distinct.
253257
#[inline]
254258
pub fn pick3_mut(&mut self, a: I, b: I, c: I) -> (&mut T, &mut T, &mut T) {
255259
let (ai, bi, ci) = (a.index(), b.index(), c.index());

0 commit comments

Comments
 (0)
Please sign in to comment.