Selected changesmerged Sep 26, 2026
Rollup of 6 pull requestsRust · 125 + / 106 −
Introduces 5 new declarations in library/core/src/sync/sync_view.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
library/core/src/sync/sync_view.rs ↗ · 18 files
@@ -129,17 +127,18 @@ impl<T: ?Sized> fmt::Debug for SyncView<T> { impl<T: Sized> SyncView<T> { /// Wrap a value in an `SyncView`- #[unstable(feature = "exclusive_wrapper", issue = "98407")]- #[rustc_const_unstable(feature = "exclusive_wrapper", issue = "98407")]+ #[stable(feature = "exclusive_wrapper", since = "CURRENT_RUSTC_VERSION")]+ #[rustc_const_stable(feature = "exclusive_wrapper", since = "CURRENT_RUSTC_VERSION")] #[must_use] #[inline] pub const fn new(t: T) -> Self { Self { inner: t } } /// Unwrap the value contained in the `SyncView`- #[unstable(feature = "exclusive_wrapper", issue = "98407")]- #[rustc_const_unstable(feature = "exclusive_wrapper", issue = "98407")]+ #[stable(feature = "exclusive_wrapper", since = "CURRENT_RUSTC_VERSION")]+ #[rustc_const_stable(feature = "exclusive_wrapper", since = "CURRENT_RUSTC_VERSION")]+ #[rustc_allow_const_fn_unstable(const_precise_live_drops)] #[must_use] #[inline] pub const fn into_inner(self) -> T {
Turbopack: Allow webpack loaders to cross filesystem roots when reading dependenciesRust · 99 + / 75 −
Introduces 3 new declarations in turbopack/crates/turbopack-node/src/transforms/webpack.rs.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
turbopack/crates/turbopack-node/src/transforms/webpack.rs ↗ · 10 files
@@ -717,22 +727,25 @@ impl EvaluateContext for WebpackLoaderContext { .try_join(); let file_subscriptions = file_paths .iter()- .map(async |p| self.cwd.join(p)?.read().await)+ .map(async |p| loader_path(&self.cwd, p).await?.read().await) .try_join(); let build_file_subscriptions = async {- build_files_changed(- self.cwd.clone(),- build_file_paths,- *self.context_source_for_issue,- )- .await?;+ // Resolve to `FileSystemPath`s before calling the task: system paths+ // aren't valid task inputs, as they aren't portable across machines.+ let build_file_paths = build_file_paths+ .iter()+ .map(|p| loader_path(&self.cwd, p))+ .try_join()+ .await?;+ build_files_changed(build_file_paths, *self.context_source_for_issue)+ .await?; Ok::<_, anyhow::Error>(()) }; let directory_subscriptions = directories .iter() .map(async |(dir, glob)| {- self.cwd- .join(dir)?+ loader_path(&self.cwd, dir)+ .await? .track_glob(Glob::new(glob.clone(), GlobOptions::default()), false) .await
fix(sorts): make smoothsort generic over Comparable itemsPython · 25 + / 10 −
Introduces 5 new declarations in sorts/smoothsort.py.
Adds new core implementation rather than adjusting what was there. Read the linked PR for the surrounding test context.
sorts/smoothsort.py ↗ · 2 files
@@ -59,20 +66,20 @@ def _sift(seq: list[int], root: int, order: int) -> None: right = root - 1 # right child root left = root - 1 - _LEONARDO[order - 2] # left child root - if seq[left] >= seq[right] and seq[left] > seq[root]:+ if not (seq[left] < seq[right]) and seq[root] < seq[left]: seq[root], seq[left] = seq[left], seq[root] root = left order -= 1- elif seq[right] > seq[left] and seq[right] > seq[root]:+ elif seq[left] < seq[right] and seq[root] < seq[right]: seq[root], seq[right] = seq[right], seq[root] root = right order -= 2 else: break -def _trinkle(- seq: list[int],+def _trinkle[T: Comparable](+ seq: list[T], pos: int, heap_sizes: list[int], idx: int,
Speed up HTTP header materializationJavaScript · 109 + / 53 −
Introduces 1 new declaration in lib/_http_incoming.js.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
lib/_http_incoming.js ↗ · 3 files
@@ -341,109 +341,161 @@ function _addHeaderLines(headers, n) { } -// This function is used to help avoid the lowercasing of a field name if it-// matches a 'traditional cased' version of a field name. It then returns the-// lowercased name to both avoid calling toLowerCase() a second time and to-// indicate whether the field was a 'no duplicates' field. If a field is not a-// 'no duplicates' field, a `0` byte is prepended as a flag. The one exception-// to this is the Set-Cookie header which is indicated by a `1` byte flag, since-// it is an 'array' field and thus is treated differently in _addHeaderLines().+// How repeated instances of a header field are combined in the headers+// object. Fields that are not known are joined with ', '.+const kFirstWins = 0;+const kJoinComma = 1;+const kJoinSemicolon = 2;+const kArray = 3;++function knownField(name, merge) {+ return { name, merge };+}++// Later values are dropped, unless joinDuplicateHeaders is set.+const kAge = knownField('age', kFirstWins);+const kHost = knownField('host', kFirstWins);+const kFrom = knownField('from', kFirstWins);+const kETag = knownField('etag', kFirstWins);+const kServer = knownField('server', kFirstWins);+const kReferer = knownField('referer', kFirstWins);+const kExpires = knownField('expires', kFirstWins);+const kLocation = knownField('location', kFirstWins);+const kUserAgent = knownField('user-agent', kFirstWins);+const kRetryAfter = knownField('retry-after', kFirstWins);+const kContentType = knownField('content-type', kFirstWins);
jinja : implement sameas testC++ · 22 + / 2 −
Reworks 23 lines of existing logic in common/jinja/value.cpp.
Changes how existing runtime behaves. Tests changed with it, with code of their own.
common/jinja/value.cpp ↗ · 2 files
@@ -515,8 +515,28 @@ const func_builtins & global_builtins() { }}, {"test_is_sameas", [](const func_args & args) -> value { // Check if an object points to the same memory address as another object- (void)args;- throw not_implemented_exception("sameas test not implemented");+ args.ensure_count(2);+ auto a = args.get_pos(0);+ auto b = args.get_pos(1);+ bool res = false;+ if (!is_val<value_undefined>(a) && !is_val<value_undefined>(b)) {+ if (is_val<value_none>(a) && is_val<value_none>(b)) {+ res = true;+ } else if (is_val<value_bool>(a) && is_val<value_bool>(b)) {+ if (a->as_bool() == b->as_bool()) {+ res = true;+ }+ } else if (is_val<value_int>(a) && is_val<value_int>(b)) {+ const int64_t x = a->as_int();+ // Allow comparison within small-int cache range+ if (x >= -5 && x <= 256 && x == b->as_int()) {+ res = true;+ }+ } else if (a == b) {+ res = true;+ }+ }+ return mk_val<value_bool>(res); }}, {"test_is_escaped", [](const func_args & args) -> value { (void)args;