Skip to content

Commit 45ee343

Browse files
committedSep 26, 2023
Auto merge of rust-lang#116168 - matthiaskrgr:rollup-ys1zmk1, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - rust-lang#116099 (Add regression test for issue rust-lang#79865) - rust-lang#116102 (Correct codegen of `ConstValue::Indirect` scalar and scalar pair) - rust-lang#116131 (Rename `cold_path` to `outline`) - rust-lang#116144 (subst -> instantiate) - rust-lang#116151 (Fix typo in rustdoc unstable features doc) - rust-lang#116153 (Update books) - rust-lang#116162 (Gate and validate `#[rustc_safe_intrinsic]`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents d23062b + b62471d commit 45ee343

File tree

52 files changed

+212
-118
lines changed

Some content is hidden

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

52 files changed

+212
-118
lines changed
 

‎compiler/rustc_arena/src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ use std::ptr::{self, NonNull};
3737
use std::slice;
3838
use std::{cmp, intrinsics};
3939

40+
/// This calls the passed function while ensuring it won't be inlined into the caller.
4041
#[inline(never)]
4142
#[cold]
42-
fn cold_path<F: FnOnce() -> R, R>(f: F) -> R {
43+
fn outline<F: FnOnce() -> R, R>(f: F) -> R {
4344
f()
4445
}
4546

@@ -600,7 +601,7 @@ impl DroplessArena {
600601
unsafe { self.write_from_iter(iter, len, mem) }
601602
}
602603
(_, _) => {
603-
cold_path(move || -> &mut [T] {
604+
outline(move || -> &mut [T] {
604605
let mut vec: SmallVec<[_; 8]> = iter.collect();
605606
if vec.is_empty() {
606607
return &mut [];

‎compiler/rustc_ast_lowering/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
16641664
lifetime.ident,
16651665
));
16661666

1667-
// Now make an arg that we can use for the substs of the opaque tykind.
1667+
// Now make an arg that we can use for the generic params of the opaque tykind.
16681668
let id = self.next_node_id();
16691669
let lifetime_arg = self.new_named_lifetime_with_res(id, lifetime.ident, res);
16701670
let duplicated_lifetime_def_id = self.local_def_id(duplicated_lifetime_node_id);

0 commit comments

Comments
 (0)