Skip to content

assert desugaring change is backwards-incompatible #145770

Closed

Description

@cramertj

This code compiles on stable, but is broken after #122661. This is causing a breakage in the bitvec crate.

#[derive(Debug)]
struct F {
    data: bool
}

impl std::ops::Not for F {
  type Output = bool;
  fn not(self) -> Self::Output { !self.data }
}

fn main() {
  let f = F { data: true };

  assert!(f);
}

See discussion on the PR.

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    on Aug 22, 2025
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Aug 22, 2025
  3. lqd commented on Aug 23, 2025

    @lqd
    Member
  4. Skgland commented on Aug 23, 2025

    @Skgland
    Contributor

    This breakage wasn’t seen in the crater results due to https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/crater.3A.20.3E100k.20.22prepare-fail.22.20crates.3F

    I could have made it more clearer that prepare-fail is a spurious failure and in contrast to error is included in the retry-regressed-list.txt making it easier to retry. But I wouldn't see my comment nor the introduction of the prepare-fail category as the reason for this issue.

    Rather the problem is that crater doesn't point out the amount of crates on the retry-regessed-list.txt resulting in these indeterminate results being overlooked and no retry being performed. In this regard I opened rust-lang/crater#791 suggesting to include that number in the crater bot comment on crater run completion to raise awareness.

  5. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Aug 23, 2025
  6. lqd commented on Aug 23, 2025

    @lqd
    Member

    To be clear the issue we need to fix is why so many crates are failing with space issues. Changing how these errors are categorized will help by making this more visible for sure; people would retry their runs with the spurious regressions until the space issue is fixed. The root cause is the latter, not your categorization improvements.

  7. estebank commented on Aug 23, 2025

    @estebank
    Contributor

    For now, let's just revert and I'll try to figure out another strategy. Worse case scenario, we gate it on the next edition, however much that saddens me. That being said, let's do that after the beta crater runs, as I'd like to get a better sense of what the actual fallout was.

  8. compiler-errors commented on Aug 23, 2025

    @compiler-errors
    Contributor

    That being said, let's do that after the beta crater runs

    We don't need to wait until beta crater runs, though, which would be beta 1.91 afaict.

    We should just be able to re-run crater on the affected crates list (which includes the prepare-fail crates). If it's the case that the affected crates are not spurious, then they'd fail in the beta crater run too and thus also be ignored, so we're really not gaining much by waiting.

    I'm gonna start the crater run here since the other PR has like 200 comments so it's kinda hard to navigate.

    @craterbot check crates=https://crater-reports.s3.amazonaws.com/pr-122661-1/retry-regressed-list.txt start=master#82310651b93a594a3fd69015e1562186a080d94c end=try#a2a6e871b05c7b8ecc9a3c8a20db1f39e995e399

  9. craterbot commented on Aug 23, 2025

    @craterbot
    Collaborator

    👌 Experiment pr-145770 created and queued.
    🔍 You can check out the queue and this experiment's details.

    ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

  10. jieyouxu commented on Aug 25, 2025

    @jieyouxu
    Member

    (Regression run)
    @craterbot name=pr-145770 p=1

  11. craterbot commented on Aug 25, 2025

    @craterbot
    Collaborator

    📝 Configuration of the pr-145770 experiment changed.

    ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

  12. 14 remaining items

  13. estebank commented on Aug 26, 2025

    @estebank
    Contributor

    Thankfully, it seems like they are all <=2021 edition, which would give us some latitude to land this in a way that new projects get the benefit. Sad that the lifetime issue wasn't resolved with the change I'd added to deal with it, though :-/

  14. removed
    S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.
    on Aug 28, 2025
  15. Amanieu commented on Sep 10, 2025

    @Amanieu
    Member

    @estebank Beta is branching later this week, if you are submitting a PR to revert it will need a beta backport.

  16. estebank commented on Sep 10, 2025

    @estebank
    Contributor

    I won't be available to revert, I'm in transit. I won't be able to fix this before then. Feel free to revert the entire PR without me, I'm sorry :(

  17. jieyouxu commented on Sep 11, 2025

    @jieyouxu
    Member

    I won't be available to revert, I'm in transit. I won't be able to fix this before then. Feel free to revert the entire PR without me, I'm sorry :(

    I opened a revert #146428 as I don't have bandwidth to investigate a limit-impact mitigation approach, and beta cutoff is close so.

  18. added a commit that references this issue on Sep 11, 2025
  19. added a commit that references this issue on Sep 11, 2025
  20. added this to the 1.91.0 milestone on Oct 1, 2025
  21. theemathas commented on Oct 25, 2025

    @theemathas
    Contributor

    Fixed by #146428

  22. added
    T-langRelevant to the language team
    I-lang-radarItems that are on lang's radar and will need eventual work or consideration.
    on Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-lang-radarItems that are on lang's radar and will need eventual work or consideration.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamT-libs-api[DEPRECATED; DO NOT USE]regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions