Update toolchain to nightly-2025-03-08#84
Merged
Conversation
f7b37ba to
53eed0d
Compare
There was a problem hiding this comment.
Pull request overview
Updates the project to Rust nightly-2025-03-08 and adjusts the codebase to match the corresponding rustc internal API changes (notably rustc_abi, TypingEnv, HIR helpers, and token APIs), to restore compatibility with rust-analyzer and align with current nightly docs.
Changes:
- Bump toolchain from
nightly-2024-09-08tonightly-2025-03-08. - Migrate multiple rustc-internal API usages (e.g.,
ParamEnv→TypingEnv,rustc_target::abi::*→rustc_abi::*, updated HIR accessors). - Update annotation/token parsing and MIR/dataflow helpers to newer token and dataflow interfaces.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rust-toolchain.toml | Bumps pinned nightly toolchain to 2025-03-08. |
| src/main.rs | Updates rustc_driver callback signatures and compiler entrypoint API usage. |
| src/lib.rs | Adds extern crate rustc_abi for new ABI imports. |
| thrust-macros/src/lib.rs | Uses is_some_and for trait-segment matching under newer std/nightly. |
| src/rty.rs | Switches VariantIdx import source and simplifies Pretty impl lifetimes. |
| src/rty/params.rs | Simplifies Pretty impl lifetimes for references. |
| src/refine/template.rs | Replaces ParamEnv normalization with TypingEnv and updates ABI enum usage. |
| src/refine/env.rs | Moves ABI indices to rustc_abi, adjusts Pretty impls, and boxes PlaceType in Path. |
| src/refine/basic_block.rs | Simplifies Pretty impl lifetimes. |
| src/pretty.rs | Simplifies Pretty impl lifetimes for PrettySlice. |
| src/chc.rs | Simplifies Pretty impl lifetimes across multiple CHC types. |
| src/annot.rs | Reworks token cursoring to avoid removed cursor APIs and updates token-kind matching. |
| src/analyze.rs | Updates HIR body access helper usage. |
| src/analyze/annot.rs | Switches to rustc_hir::Attribute and updates token extraction/splitting. |
| src/analyze/annot_fn.rs | Updates HIR body access and normalization to TypingEnv. |
| src/analyze/crate_.rs | Updates token-stream iteration for raw command annotations and lifetime kind matching. |
| src/analyze/did_cache.rs | Updates HIR item iteration/access and moves FieldIdx import to rustc_abi. |
| src/analyze/local_def.rs | Updates MIR/dataflow APIs, HIR helpers, BitSet → DenseBitSet, and transmute-based box-deref pattern matching. |
| src/analyze/basic_block.rs | Updates layout/const-eval to TypingEnv, adapts cast matching, and adds handling for Transmute. |
| src/analyze/basic_block/drop_point.rs | BitSet → DenseBitSet and adapts visitor traversal to newer MIR visitation APIs. |
| src/analyze/basic_block/visitor/rust_call.rs | Updates ABI matching to rustc_abi::ExternAbi. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
498c1d0 to
ba2f6fd
Compare
API migrations: - rustc_index::bit_set::BitSet → DenseBitSet (aliased as BitSet) - rustc_target::abi → rustc_abi for FieldIdx, VariantIdx - rustc_target::spec::abi::Abi → rustc_abi::ExternAbi - MoveDataParamEnv removed; replaced with tuple (MoveData, TypingEnv) - ParamEnv::reveal_all()/with_reveal_all_normalized() → TypingEnv::fully_monomorphized() - ParamEnv usages in const_eval_resolve/Instance::try_resolve/ normalize_erasing_regions/layout_of → TypingEnv - tcx.param_env_reveal_all_normalized() → TypingEnv::fully_monomorphized() - MirVisitable removed; replaced with explicit visit_statement/visit_terminator calls - BinOpToken removed; token kinds flattened (BinOp(X) → X) - TokenKind::Not → TokenKind::Bang - TokenStream::trees() → TokenStream::iter() - RefTokenTreeCursor removed; replaced with custom TokenCursor - hir::Map methods moved to TyCtxt: body_owned_by → hir_body_owned_by, maybe_body_owned_by → hir_maybe_body_owned_by, body → hir_body, items → hir_free_items, item → hir_item - rustc_hir::Attribute is now enum (Parsed/Unparsed) instead of rustc_ast::Attribute - into_engine removed from dataflow analyses → iterate_to_fixpoint(tcx, body, None) - MoveData::gather_moves takes 3 args (no param_env) - ItemKind::Fn changed from tuple to struct variant - PointerCoercion::ReifyFnPointer now has 2 fields - rustc_driver::RunCompiler → rustc_driver::run_compiler - Callbacks::after_analysis now takes TyCtxt directly - Callbacks::after_crate_root_parsing now takes &mut Crate - CastKind::Transmute now generated for Box pointer internals - thrust-macros: syn::Path PartialEq removed; use token string comparison https://claude.ai/code/session_01URrtbSTUKNrVKLK2MNLBFc
ba2f6fd to
aa544aa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#26