Skip to content

fix(jit): update cranelift-frontend 0.127 API and reformat for edition 2024#42

Open
quinnjr wants to merge 1 commit intomainfrom
fix/cranelift-api-update
Open

fix(jit): update cranelift-frontend 0.127 API and reformat for edition 2024#42
quinnjr wants to merge 1 commit intomainfrom
fix/cranelift-api-update

Conversation

@quinnjr
Copy link
Copy Markdown
Contributor

@quinnjr quinnjr commented Feb 18, 2026

Summary

  • Update declare_var calls to match cranelift-frontend 0.127 API (now takes only type, returns Variable)
  • Fix unused variable warning in JIT module
  • Apply cargo fmt across all source files for Rust edition 2024 style compliance

Root Cause

Dependabot bumped cranelift-frontend from 0.113 to 0.127 (#24), which changed the FunctionBuilder::declare_var signature from declare_var(variable, type) to declare_var(type) -> Variable. This broke CI with 4 E0061 errors.

Test plan

  • cargo check passes locally
  • cargo fmt --check passes locally
  • CI passes on this branch

…n 2024

cranelift-frontend 0.127 changed declare_var from taking (variable, type)
to taking only (type) and returning the Variable. The old 2-arg calls in
compiler.rs caused E0061 compilation errors in CI.

Additionally, the crate uses Rust edition 2024, which introduced new
rustfmt defaults (sorted imports, different line-wrapping thresholds).
Running cargo fmt brings all source files into compliance.

- Remove EntityRef and Variable imports from compiler.rs
- Replace Variable::new(n) + declare_var(var, ty) with declare_var(ty)
- Prefix unused `compiler` binding with underscore in jit/mod.rs
- Apply cargo fmt across all source files for edition 2024 style
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Please update the PR or let us know if you need assistance!

@github-actions github-actions bot added the stale label Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant