Selected changesmerged Sep 14, 2026 – Sep 20, 2026
even more cleanups for `rustc_builtin_macros`Rust · 155 + / 265 −
Introduces 5 new declarations in compiler/rustc_builtin_macros/src/deriving/generic/mod.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_builtin_macros/src/deriving/generic/mod.rs ↗ · 14 files
@@ -965,70 +927,66 @@ impl<'a> MethodDef<'a> { !self.explicit_self } - fn extract_arg_details(- &self,- cx: &ExtCtxt<'_>,- trait_: &TraitDef<'_>,- type_ident: Ident,- generics: &Generics,- ) -> ArgDetails {+ fn extract_arg_details(&self, cx: &ExtCtxt<'_>, trait_: &TraitDef<'_>) -> ArgDetails { let mut selflike_args = ThinVec::new(); let mut nonselflike_args = Vec::new();- let mut nonself_arg_tys = Vec::new(); let span = trait_.span; - let explicit_self = self.explicit_self.then(|| {+ if self.explicit_self { // This constructs a fresh `self` path. selflike_args.push(cx.expr_self(span));- respan(span, SelfKind::Region(None, ast::Mutability::Not))- });+ } for (ty, name) in self.nonself_args.iter() {- let ast_ty = ty.to_ty(cx, span, type_ident, generics); let ident = Ident::new(*name, span);- nonself_arg_tys.push((ident, ast_ty));- let arg_expr = cx.expr_ident(span, ident); match ty { // Selflike (`&Self`) arguments only occur in non-static methods.
fix(cli): preserve double dash before the entrypointRust · 188 + / 0 −
Introduces 8 new declarations in libs/cli_parser/src/tests.rs.
Adds new language design rather than adjusting what was there. Read the linked PR for the surrounding test context.
libs/cli_parser/src/tests.rs ↗ · 3 files
@@ -1195,6 +1214,48 @@ fn eval_print() { assert_eq!(r.get_one("code_arg"), Some("1+1")); } +#[test]+fn eval_double_dash_before_code() {+ let r = parse(+ &TEST_ROOT,+ &svec!["deno", "eval", "--", "-1; console.log(0)", "arg1"],+ )+ .unwrap();+ assert_eq!(r.get_one("code_arg"), Some("-1; console.log(0)"));+ assert_eq!(r.trailing, vec!["arg1"]);+}++#[test]+fn eval_double_dash_before_code_keeps_second_separator() {+ // Only the first `--` is special (mirrors clap): it was consumed to make+ // the positional literal, so a later `--` is forwarded as-is even though+ // eval strips the separator in `deno eval code -- a`.+ let r =+ parse(&TEST_ROOT, &svec!["deno", "eval", "--", "code", "--", "a"]).unwrap();+ assert_eq!(r.get_one("code_arg"), Some("code"));+ assert_eq!(r.trailing, vec!["--", "a"]);+}++#[test]+fn upgrade_double_dash_stays_trailing() {+ // Commands without trailing var args don't enter positional-only mode:+ // `--` still starts (unused) trailing args, as before.+ let r =+ parse(&TEST_ROOT, &svec!["deno", "upgrade", "--", "v1", "v2"]).unwrap();+ assert_eq!(r.get_one("version-or-hash-or-channel"), None);+ assert_eq!(r.trailing, vec!["v1", "v2"]);
Fix tree_sort dropping duplicate valuesPython · 9 + / 5 −
Reworks 12 lines of existing logic in sorts/tree_sort.py.
Changes how existing core implementation behaves. Read the linked PR for the surrounding test context.
sorts/tree_sort.py ↗ · 1 files
@@ -36,11 +36,11 @@ def insert(self, val: T) -> None: self.left = Node(val) else: self.left.insert(val)- elif val > self.val:- if self.right is None:- self.right = Node(val)- else:- self.right.insert(val)+ # Equal values go to the right so that duplicates are kept.+ elif self.right is None:+ self.right = Node(val)+ else:+ self.right.insert(val) def tree_sort[T: Comparable](arr: Iterable[T]) -> tuple[T, ...]: