Selected changesmerged Sep 14, 2026
Fix initialization cycle in `target_config`Rust · 120 + / 34 −
Introduces 11 new declarations in compiler/rustc_codegen_llvm/src/back/owned_mc_subtarget_info.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_codegen_llvm/src/back/owned_mc_subtarget_info.rs ↗ · 17 files
@@ -0,0 +1,49 @@+use std::ffi::CStr;+use std::ptr::NonNull;++use rustc_data_structures::small_c_str::SmallCStr;++use crate::diagnostics::LlvmError;+use crate::llvm;++/// Responsible for safely creating and disposing llvm::MCSubtargetInfo via ffi functions.+/// Not cloneable as there is no clone function for llvm::MCSubtargetInfo.+pub(crate) struct OwnedMCSubtargetInfo {+ info_unique: NonNull<llvm::MCSubtargetInfo>,+}++impl OwnedMCSubtargetInfo {+ pub(crate) fn new(+ triple: &CStr,+ cpu: &CStr,+ features: &CStr,+ ) -> Result<Self, LlvmError<'static>> {+ // SAFETY: llvm::LLVMRustCreateMCSubtargetInfo copies pointed-to data.+ let info_ptr = unsafe {+ llvm::LLVMRustCreateMCSubtargetInfo(triple.as_ptr(), cpu.as_ptr(), features.as_ptr())+ };++ NonNull::new(info_ptr)+ .map(|info_unique| Self { info_unique })+ .ok_or_else(|| LlvmError::CreateMCSubtargetInfo { triple: SmallCStr::from(triple) })+ }++ pub(crate) fn has_feature(&self, feature: &CStr) -> bool {+ // SAFETY: `new` ensures we have a valid pointer created by+ // `llvm::LLVMRustCreateMCSubtargetInfo`.
perf_hooks: reuse buffer for uv metricsC++ · 35 + / 15 −
Reworks 33 lines of existing logic in src/node_perf.cc.
Changes how existing runtime behaves. Tests changed with it, with code of their own.
src/node_perf.cc ↗ · 6 files
@@ -265,17 +277,13 @@ void LoopIdleTime(const FunctionCallbackInfo<Value>& args) { void UvMetricsInfo(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args);- Isolate* isolate = env->isolate(); uv_metrics_t metrics; // uv_metrics_info always return 0 CHECK_EQ(uv_metrics_info(env->event_loop(), &metrics), 0);- Local<Value> data[] = {- Integer::New(isolate, metrics.loop_count),- Integer::New(isolate, metrics.events),- Integer::New(isolate, metrics.events_waiting),- };- Local<Array> arr = Array::New(env->isolate(), data, arraysize(data));- args.GetReturnValue().Set(arr);+ AliasedInt32Array& buffer = env->performance_state()->uv_metrics;+ buffer[0] = static_cast<int32_t>(metrics.loop_count);+ buffer[1] = static_cast<int32_t>(metrics.events);+ buffer[2] = static_cast<int32_t>(metrics.events_waiting); } void CreateELDHistogram(const FunctionCallbackInfo<Value>& args) {
[DOM] Fix Fragment compareDocumentPosition for the root containerJavaScript · 19 + / 7 −
Introduces 1 new declaration in packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js ↗ · 3 files
@@ -3715,13 +3716,13 @@ function validateDocumentPositionWithFiberTree( } if (documentPosition & Node.DOCUMENT_POSITION_CONTAINS) { if (otherFiber === null) {- // otherFiber could be null if its the document, documentElement, or body- const ownerDocument = getOwnerDocumentFromRootContainer(otherNode);- return (- (otherNode as Instance | Document) === ownerDocument ||- otherNode === ownerDocument.documentElement ||- otherNode === ownerDocument.body- );+ // otherFiber is null when otherNode is not part of a React tree. That+ // includes the document, documentElement and body, but also the root+ // container and any element above it. All of them contain the whole+ // React tree, so check containment of the root container rather than+ // enumerating the nodes above it.+ const rootContainer = getFragmentRootContainerInfo(fragmentFiber);+ return rootContainer !== null && otherNode.contains(rootContainer); } return isFragmentContainedByFiber(fragmentFiber, otherFiber); }
Surface overlapping PRs in pr_file_map.py to ease landing PRsPython · 47 + / 15 −
Reworks 59 lines of existing logic in scripts/pr_file_map.py.
Changes how existing core implementation behaves. Read the linked PR for the surrounding test context.
scripts/pr_file_map.py ↗ · 1 files
@@ -6,16 +6,23 @@ and, for each file touched by any open PR, which PR number(s) touch it. Output is GitHub-flavored Markdown that includes this script's path, the-current UTC datetime, and summary counts for open PRs, file entries, and-existing/missing files. It then renders a sorted list of files that currently-exist in the working directory, each with its modifying PR numbers, followed-by a separate section for files referenced by open PRs but that do not exist-in the working directory (e.g. deleted, renamed, or on a branch not checked-out locally).+current UTC datetime, and summary counts for open PRs, file touches, distinct+files, and existing/missing files. It highlights files touched by more than one+open PR first (the likely merge-conflict hot spots when landing PRs), then+renders a sorted list of files that currently exist in the working directory,+each with its modifying PR numbers, followed by a separate section for files+referenced by open PRs but that do not exist in the working directory (e.g.+deleted, renamed, or on a branch not checked out locally).++Two file totals are reported because they answer different questions:+ - "file touches" counts every (PR, file) pair, so a file edited by three open+ PRs contributes three touches; and+ - "distinct files" counts each touched path once.+Only the distinct total equals `existing + missing`, since those are deduped. Run status is also written to stderr with: - Number of PRs from `get_open_prs()`- - Number of files from `get_pr_files()`+ - Number of file touches from `get_pr_files()` and distinct files touched - Number of existing and missing files Requirements: gh (GitHub CLI), authenticated (`gh auth login`)
fix(cli): generate valid bash completionsRust · 13 + / 4 −
Introduces 1 new declaration in libs/cli_parser/src/completions.rs.
Adds new language design rather than adjusting what was there. Read the linked PR for the surrounding test context.
libs/cli_parser/src/completions.rs ↗ · 1 files
@@ -747,6 +746,16 @@ mod tests { assert!(v.iter().any(|f| f.starts_with("--")), "{v:?}"); } + #[test]+ fn generate_bash_uses_real_newlines() {+ let s = String::from_utf8(generate("bash", &DENO_ROOT)).unwrap();+ assert!(+ s.contains("\"deno,run\")\n cmd=\"deno__run\""),+ "{s}"+ );+ assert!(s.contains(" *)\n ;;"), "{s}");+ }+ #[test] fn generate_zsh_short_flags_keep_their_dash() { // Regression test for #36713: the brace expansion dropped the `-` on the