Claude/rust active logic demos masd4#154239
Closed
eelstork wants to merge 17 commits intorust-lang:mainfrom
Closed
Claude/rust active logic demos masd4#154239eelstork wants to merge 17 commits intorust-lang:mainfrom
eelstork wants to merge 17 commits intorust-lang:mainfrom
Conversation
This adds a new `Decisive` trait to `core::ops` that enables custom types to use `&&` and `||` operators with proper short-circuit evaluation. Types implementing `Decisive + BitAnd` can use `&&`, and types implementing `Decisive + BitOr` can use `||`. The Decisive trait has two methods: - `is_true(&self) -> bool`: controls || short-circuiting - `is_false(&self) -> bool`: controls && short-circuiting This enables behavior trees and three-valued logic systems to be expressed naturally in Rust, matching the approach described in the paper "Implementing Behavior Trees using Three-Valued Logic" (arXiv:2011.03835). Changes: - library/core/src/ops/decisive.rs: New Decisive trait with bool impl - compiler/rustc_span/src/symbol.rs: Register decisive symbols - compiler/rustc_hir/src/lang_items.rs: Register Decisive lang item - compiler/rustc_hir_typeck/src/op.rs: Type checking for non-bool &&/|| - compiler/rustc_middle/src/thir.rs: Add OverloadedLogicalOp to THIR - compiler/rustc_mir_build/: MIR lowering with short-circuit desugaring - tests/ui/traits/decisive-trait.rs: Comprehensive test https://claude.ai/code/session_01UdHGekBLaGK9SSDq9Yqh1u
Builds stage1 compiler with download-ci-llvm, runs the decisive trait UI tests, and checks the rust-al-demos crate. https://claude.ai/code/session_01JWiQ9rhpzDZxVdAUcvZjxF
Build the stage1 compiler only when a v* tag is pushed, avoiding expensive builds on every commit. https://claude.ai/code/session_01JWiQ9rhpzDZxVdAUcvZjxF
Minor version bump for the Decisive trait addition, which enables overloadable && and || operators via short-circuit evaluation. Suffix distinguishes this fork from upstream Rust releases. https://claude.ai/code/session_01JWiQ9rhpzDZxVdAUcvZjxF
The upstream ci.yml runs the full rust-lang/rust build matrix which requires bors, sccache/S3, and dedicated runners. On this fork it just burns CI minutes and gets cancelled after ~6 min. Removed the pull_request trigger from ci.yml and added one to decisive-ci.yml so PRs get the lightweight stage1 build + test instead. https://claude.ai/code/session_01JWiQ9rhpzDZxVdAUcvZjxF
This workflow is for the compiler fork only — build stage1 and run the decisive trait UI tests. The demos repo doesn't exist yet and shouldn't be tested here. Also simplified paths by removing the unnecessary `path: rust` checkout indirection. https://claude.ai/code/session_01JWiQ9rhpzDZxVdAUcvZjxF
The deprecated `changelog-seen` field was removed from bootstrap. Replace `config.toml` with `bootstrap.toml` and use `change-id = 153143` (current latest). https://claude.ai/code/session_01JWiQ9rhpzDZxVdAUcvZjxF
Bootstrap runs `git rev-parse HEAD^1` to detect submodule changes, which fails on a shallow clone (depth=1). Set fetch-depth: 2 and submodules: recursive so the parent commit and submodule checkouts are available. https://claude.ai/code/session_01JWiQ9rhpzDZxVdAUcvZjxF
CI LLVM downloads fail with 404 on forks since the pre-built artifacts are keyed to upstream commits. Switch to building LLVM from source and cache the built LLVM alongside stage0. https://claude.ai/code/session_01JWiQ9rhpzDZxVdAUcvZjxF
Every green build now produces a rustc-decisive tarball (uploaded as GitHub Actions artifact, 90-day retention). Tagged builds (v*) also create a GitHub Release with install instructions. https://claude.ai/code/session_01JWiQ9rhpzDZxVdAUcvZjxF
Collaborator
|
Some changes occurred in match checking cc @Nadrieril Some changes occurred in coverage instrumentation. cc @Zalathar Some changes occurred in cc @BoxyUwU |
Collaborator
|
r? @jackh726 rustbot has assigned @jackh726. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
Please do this kind of thing in the fork repository. |
Member
|
Hi. This is the moderation team of the Rust project. We are assuming that this PR was intended for a fork or elsewhere and not actually intended for If you did mean to submit this against |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.