Skip to content

chore(deps): bump MSRV to 1.95.0#24359

Merged
graphite-app[bot] merged 1 commit into
mainfrom
codex/bump-msrv-1-95
Jul 10, 2026
Merged

chore(deps): bump MSRV to 1.95.0#24359
graphite-app[bot] merged 1 commit into
mainfrom
codex/bump-msrv-1-95

Conversation

@camc314

@camc314 camc314 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Bump MSRV to 1.95.0, following our +2 MSRV policy.

Copilot AI review requested due to automatic review settings July 10, 2026 14:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@camc314 camc314 changed the title chore(repo): bump msrv to 1.95 chore(deps): bump MSRV to 1.95.0 Jul 10, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jul 10, 2026
@camc314 camc314 self-assigned this Jul 10, 2026

camc314 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

Bump MSRV to 1.95.0, following our +2 MSRV policy.
@graphite-app
graphite-app Bot force-pushed the codex/bump-msrv-1-95 branch from c877115 to 7da0bb1 Compare July 10, 2026 14:30
@graphite-app
graphite-app Bot merged commit 7da0bb1 into main Jul 10, 2026
27 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Jul 10, 2026
@graphite-app
graphite-app Bot deleted the codex/bump-msrv-1-95 branch July 10, 2026 14:34
graphite-app Bot pushed a commit that referenced this pull request Jul 10, 2026
#24359 bumped our MSRV to 1.95.0. We can now use `Vec::push_mut`.

Use it in `ReplaceWith` to remove an infallible `unwrap` which compiler previously couldn't prove was infallible. Previously it emitted a panicking branch, now it doesn't.

This code is on a cold path, so perf impact is miniscule, but why not use the best API for the job?
graphite-app Bot pushed a commit that referenced this pull request Jul 10, 2026
[#24359](#24359) bumped our MSRV to 1.95.0.

Now *at last* we have a decent way to guide branch layout: [`std::hint::cold_path`](https://doc.rust-lang.org/stable/core/hint/fn.cold_path.html). 🍾

Add the `likely` and `unlikely` functions that Rust's docs suggest as simple ways to use this capability.
graphite-app Bot pushed a commit that referenced this pull request Jul 11, 2026
…rds (#24383)

Rust 1.95 stabilized if-let guards in match arms (MSRV bumped in #24359). This converts the three places which guard on `is_some()` and then re-extract the same value in the body — the guard now binds the value directly:

- `oxc_semantic` `binder.rs` — `export_decl.declaration.is_some()` guard followed by `.as_ref().unwrap()`.
- `oxc_transformer` `typescript/annotations.rs` — `decl.declaration.is_some()` guard followed by an `is_some_and` re-check.
- `oxc_react_compiler` `validate_preserved_manual_memoization.rs` — `state.manual_memo_state.is_some()` guard followed by `.as_mut().unwrap()`; the guard now binds `&mut` directly. The sibling `StoreLocal` arm used the same unwrap idiom in a body `if`, converted to a let chain for consistency.

I audited the other ~15 `is_some()` match guards in the workspace: they only test the value without extracting it in the body, so they stay as plain guards.

Verified: crate tests pass, semantic coverage suites and Babel transform conformance produce **zero snapshot diffs**, clippy clean for the changed files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
graphite-app Bot pushed a commit that referenced this pull request Jul 11, 2026
Rust 1.95 stabilized [`Atomic*::update`](https://doc.rust-lang.org/std/sync/atomic/struct.AtomicUsize.html#method.update) (MSRV bumped in #24359), the infallible sibling of `fetch_update` for closures that always produce a new value.

Both `fetch_update` call sites (`oxc_allocator/src/tracking.rs` and `tasks/track_memory_allocations`) used an always-`Some` closure, so they gain nothing from the fallible API — switching to `update` drops the ignored `Result` (`let _ =`) and the "cannot be `Err`" comments. Same CAS-loop semantics; `saturating_add` behavior unchanged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
graphite-app Bot pushed a commit that referenced this pull request Jul 11, 2026
Rust 1.95 stabilized [`<*const T>::as_ref_unchecked`](https://doc.rust-lang.org/std/primitive.pointer.html#method.as_ref_unchecked) (MSRV bumped in #24359). This replaces the `ptr.as_ref().unwrap_unchecked()` idiom at its 5 call sites:

- `oxc_parser` `lexer/source.rs` `read()`/`read2()` — the doc comment there explains the idiom exists because producing a `&u8` carries `nonnull`/`dereferenceable` LLVM metadata that a raw deref does not (7% lexer speedup). `as_ref_unchecked` is implemented as exactly that reference production (`&*self`), so codegen is unchanged — it just skips the `Option` detour. Comment updated to name the new method.
- `oxc_codegen` `lib.rs` — `</script` search loop.
- `oxc_ast_visit` `utf8_to_utf16/translation.rs` — chunk read.
- `oxc_ast` `generated/ast_kind.rs` `AstKind::ty` — changed via its generator in `tasks/ast_tools`, regenerated with `just ast`.

Verified: `cargo test` for the touched crates, and parser/semantic/codegen conformance (test262 / babel / typescript / misc) with **zero snapshot diffs**. CodSpeed should show this perf-neutral.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
graphite-app Bot pushed a commit that referenced this pull request Jul 12, 2026
Rust 1.95 stabilized [`Layout::repeat`](https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.repeat) (MSRV bumped in #24359), which the `UnstableLayoutMethods` polyfill trait in `bumpalo_alloc.rs` was waiting on (per its TODO comment).

It turns out the whole trait is deletable rather than just replaceable:

- The only `.repeat()` call outside the trait itself (`vec2/raw_vec.rs`) is inside a commented-out block.
- The live `Layout::array::<T>(n)` calls already resolve to the inherent std method (stable since 1.44), not the trait method.
- `padding_needed_for` was only used by the trait's own `repeat` impl.

Also drops the two `#![allow(unstable_name_collisions)]` attributes, which only existed because the trait methods collided with the then-unstable std inherent methods.

Net: -59 lines, no behavior change. `cargo check/clippy/test -p oxc_allocator` all clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants