Selected changesmerged Nov 7, 2026
name elided lifetimes in `use<...>` suggestion when `impl Trait` params are presentRust · 120 + / 73 −
Introduces 3 new declarations in compiler/rustc_trait_selection/src/error_reporting/infer/region.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_trait_selection/src/error_reporting/infer/region.rs ↗ · 7 files
@@ -1561,72 +1605,56 @@ fn suggest_precise_capturing<'tcx>( concatenated_bounds, }); } else {- let mut next_fresh_param = || {- ['T', 'U', 'V', 'W', 'X', 'Y', 'A', 'B', 'C']- .into_iter()- .map(sym::character)- .chain((0..).map(|i| Symbol::intern(&format!("T{i}"))))- .find(|s| captured_non_lifetimes.insert(*s))- .unwrap()- };-- let mut new_params = String::new();- let mut suggs = vec![];- let mut apit_spans = vec![];-- for (i, (span, name)) in synthetics.into_iter().enumerate() {- apit_spans.push(span);-- let fresh_param = next_fresh_param();-- // Suggest renaming.- suggs.push((span, fresh_param.to_string()));-- // Super jank. Turn `impl Trait` into `T: Trait`.- //- // This currently involves stripping the `impl` from the name of- // the parameter, since APITs are always named after how they are- // rendered in the AST. This sucks! But to recreate the bound list- // from the APIT itself would be miserable, so we're stuck with- // this for now!- if i > 0 {- new_params += ", ";
mtmd: move log-mel computation to cgraphC++ · 574 + / 486 −
Introduces 3 new declarations in tools/mtmd/mtmd-audio.cpp.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
tools/mtmd/mtmd-audio.cpp ↗ · 6 files
@@ -270,100 +269,44 @@ static void ifft(const mtmd_audio_cache & cache, float * in, int N, float * out) fft_impl<true, false>(cache, in, N, out); } -struct filter_params {- int64_t n_mel;- int64_t n_fft_bins;- int32_t hann_window_size;- int32_t hop_length;- int32_t sample_rate;- bool no_padding = false;- bool center_padding = false;- float preemph = 0.f;- bool use_natural_log = false;- bool norm_per_feature = false;- bool use_magnitude = false; // |X| instead of |X|^2- float mel_floor = 5.960464477539063e-08f;- bool mel_floor_add = false; // log(x + floor) instead of log(max(x, floor))- bool std_eps_after_sqrt = false; // std + eps instead of sqrt(var + eps)-};--static void log_mel_spectrogram_worker_thread(int ith,- const float * hann,- const std::vector<float> & samples,- int n_samples,- int frame_size,- int frame_step,- int n_threads,- const filter_params & params,- const mtmd_audio_cache & cache,- mtmd_audio_mel & out) {- std::vector<float> fft_in(frame_size * 2, 0.0);- std::vector<float> fft_out(frame_size * 2 * 2 * 2);-
[KEP-4443] Add more granular job failure condition reasonsGo · 291 + / 9 −
Introduces 14 new declarations in pkg/apis/batch/v1/zz_generated.validations.go.
Adds new systems design rather than adjusting what was there. Tests changed with it, with code of their own.
pkg/apis/batch/v1/zz_generated.validations.go ↗ · 39 files
@@ -768,3 +797,88 @@ func Validate_JobTemplateSpec( return errs }++// Validate_PodFailurePolicy validates an instance of PodFailurePolicy according+// to declarative validation rules in the API schema.+func Validate_PodFailurePolicy(+ ctx context.Context, op operation.Operation, fldPath *field.Path,+ obj, oldObj *batchv1.PodFailurePolicy) (errs field.ErrorList) {++ { // field batchv1.PodFailurePolicy.Rules+ fn := func(+ fldPath *field.Path,+ obj, oldObj []batchv1.PodFailurePolicyRule,+ oldValueCorrelated bool) (errs field.ErrorList) {+ // don't revalidate unchanged data+ if oldValueCorrelated && op.Type == operation.Update {+ if validate.SemanticDeepEqual(obj, oldObj) {+ return nil+ }+ }+ // call field-attached validations+ earlyReturn := false+ if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {+ earlyReturn = true+ }+ if earlyReturn {+ return // do not proceed+ }+ // iterate the list and call the type's validation function+ if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_PodFailurePolicyRule); len(e) != 0 {+ errs = append(errs, e...)+ }
sqlite: add ReadOptionalString helperC++ · 34 + / 95 −
Reworks 113 lines of existing logic in src/node_sqlite.cc.
Changes how existing runtime behaves. Tests changed with it, with code of their own.
src/node_sqlite.cc ↗ · 5 files
@@ -2843,46 +2853,8 @@ void Database::CreateSession(const FunctionCallbackInfo<Value>& args) { } Local<Object> options = args[0].As<Object>();-- Local<String> table_key = env->table_string();- bool hasIt;- if (!options->HasOwnProperty(env->context(), table_key).To(&hasIt)) {- return;- }- if (hasIt) {- Local<Value> table_value;- if (!options->Get(env->context(), table_key).ToLocal(&table_value)) {- return;- }-- if (table_value->IsString()) {- table = Utf8Value(env->isolate(), table_value).ToString();- } else {- THROW_ERR_INVALID_ARG_TYPE(- env->isolate(), "The \"options.table\" argument must be a string.");- return;- }- }-- Local<String> db_key = FIXED_ONE_BYTE_STRING(env->isolate(), "db");-- if (!options->HasOwnProperty(env->context(), db_key).To(&hasIt)) {- return;- }- if (hasIt) {- Local<Value> db_value;- if (!options->Get(env->context(), db_key).ToLocal(&db_value)) {- // An error will have been scheduled.
ENH: astype("boolean") converts values as astype(bool) (GH#37614)Python · 42 + / 34 −
Reworks 55 lines of existing logic in pandas/core/arrays/boolean.py.
Changes how existing language design behaves. Tests changed with it, with code of their own.
pandas/core/arrays/boolean.py ↗ · 7 files
@@ -200,45 +206,49 @@ def coerce_to_array( mask = mask.copy() return values, mask + # Values are converted as by astype(bool), except that missing values+ # (NA, None, NaT, and NaN unless future.distinguish_nan_and_na) are masked+ values = extract_array(values, extract_numpy=True) mask_values = None if isinstance(values, np.ndarray) and values.dtype == np.bool_: if copy: values = values.copy()- elif isinstance(values, np.ndarray) and values.dtype.kind in "iufcb":- mask_values = isna(values)-+ elif isinstance(values, np.ndarray) and values.dtype.kind in "iufcmM":+ if values.dtype.kind in "fc" and not is_nan_na():+ mask_values = np.zeros(values.shape, dtype=bool)+ else:+ mask_values = isna(values)+ values = values.astype(bool)+ values[mask_values] = False+ elif isinstance(getattr(values, "dtype", None), CategoricalDtype):+ # convert each category once; Categorical.astype(bool) can warn here+ cat_values, _ = coerce_to_array(values.categories._values)+ mask_values = values.codes == -1+ values = take_nd(cat_values, values.codes, fill_value=False)+ elif isinstance(values, ExtensionArray):+ mask_values = np.asarray(values.isna(), dtype=bool) values_bool = np.zeros(len(values), dtype=bool) values_bool[~mask_values] = values[~mask_values].astype(bool)-- if not np.all(- values_bool[~mask_values].astype(values.dtype) == values[~mask_values]- ):