Merged
Conversation
b37f058 to
ef44365
Compare
There was a problem hiding this comment.
Pull request overview
Updates the repository’s pinned Rust nightly to nightly-2024-09-08 and adjusts Thrust’s rustc-internal integrations and UI tests to compile and run on the newer compiler.
Changes:
- Bump pinned toolchain from
nightly-2024-03-08tonightly-2024-09-08. - Update rustc API usages across analysis/refinement code (HIR body access,
Instance::try_resolve, MIR dataflow APIs, token kinds, fn ptr ty representation). - Add a MIR normalization workaround for
SwitchIntdiscriminant ordering, and stabilize UI tests by clearingTHRUST_SOLVER_ARGS.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
rust-toolchain.toml |
Pins the project to nightly-2024-09-08 and keeps required components. |
src/refine/template.rs |
Adapts type translation to updated rustc type APIs (folder trait, fn ptr representation, unit type access). |
src/main.rs |
Adjusts parser construction to match updated rustc_parse API return type. |
src/annot.rs |
Updates token kind usage for path separators on newer rustc. |
src/analyze/local_def.rs |
Updates HIR access patterns, instance resolution, and adds SwitchInt discriminant order normalization before running dataflow. |
src/analyze/basic_block/drop_point.rs |
Updates graph successor trait import to match rustc changes. |
src/analyze/basic_block.rs |
Updates const-eval APIs and iterator handling changes for call args / deref APIs. |
src/analyze/annot_fn.rs |
Updates HIR body access and instance resolution to newer rustc APIs. |
src/analyze.rs |
Updates discriminant evaluation conversion and FnSig field rename (unsafety → safety). |
std.rs |
Adds a new extern spec for PartialEq::eq. |
tests/ui/pass/iterators/range.rs |
Clears THRUST_SOLVER_ARGS to stabilize solver invocation during UI testing. |
tests/ui/fail/iterators/range.rs |
Clears THRUST_SOLVER_ARGS to stabilize solver invocation during UI testing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+275
to
+283
| // TODO: this is too restrictive and impls should be able to choose the definition of equality | ||
| #[thrust::extern_spec_fn] | ||
| #[thrust_macros::requires(true)] | ||
| #[thrust_macros::ensures(result == (x == y))] | ||
| fn _extern_spec_partialeq_eq<T>(x: &T, y: &T) -> bool | ||
| where T: thrust_models::Model + PartialEq, T::Ty: PartialEq | ||
| { | ||
| PartialEq::eq(x, y) | ||
| } |
Owner
Author
There was a problem hiding this comment.
This will not make verification unsound because the eq impl is checked against this type. And I'm saying this is too restrictive and this should be fixed finally.
Update rust-toolchain.toml to nightly-2024-09-08 and fix compilation errors from API changes in this nightly version: - Rename WithSuccessors to Successors (rustc_data_structures::graph) - Rename TypeFolder::interner to cx - TyKind::FnPtr now takes (sig_tys, hdr) instead of (sig) - Remove Ty::new_unit in favor of tcx.types.unit - body_owned_by / maybe_body_owned_by now return &Body directly - boxed_ty() now returns Option<Ty> - TyKind::RawPtr now takes (ty, mutbl) instead of TypeAndMut - MaybeInitializedPlaces::new takes &move_data instead of &MoveDataParamEnv - try_to_int/try_to_u32 renamed to to_int/to_u32 - sig.unsafety renamed to sig.safety - const_eval_resolve takes DUMMY_SP instead of None - builtin_deref returns Option<Ty> instead of Option<TypeAndMut> - TokenKind::ModSep renamed to PathSep - new_parser_from_source_str returns Result - Instance::resolve renamed to Instance::try_resolve Also add normalize_switch_int_discriminant_order() to handle the new assertion in nightly-2024-09-08 that SwitchInt targets must be in AdtDef::discriminants order, and skip unknown defs gracefully when Instance::try_resolve resolves to blanket impls not tracked by thrust. https://claude.ai/code/session_01URrtbSTUKNrVKLK2MNLBFc Fix clippy warning and apply cargo fmt - Use .iter() instead of .into_iter() on Box<[T]> to avoid ambiguity with the Rust 2024 edition semantics change (boxed_slice_into_iter) - Apply cargo fmt formatting https://claude.ai/code/session_01URrtbSTUKNrVKLK2MNLBFc
ef44365 to
f029193
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