Skip to content

regression: ICE all spans must be disjoint #147973

Closed

Activity

  1. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    on Oct 22, 2025
  2. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    regression-untriagedUntriaged performance or correctness regression.
    on Oct 22, 2025
  3. 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 Oct 22, 2025
  4. madsmtm commented on Oct 22, 2025

    @madsmtm
    Member

    Probably fixed by #147849 (?)

    CC @jdonszelmann

  5. jdonszelmann commented on Oct 22, 2025

    @jdonszelmann
    Contributor

    Yea, but that's still in mcp phase

  6. added
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    on Oct 22, 2025
  7. theemathas commented on Oct 23, 2025

    @theemathas
    Contributor

    Presumably regressed in #146121. cc @Muscraft

    The for_loops_over_fallibles lint had a preexisting bug. It produced an invalid suggestion on stable. This invalid suggestion was caught in an assert in the aforementioned PR.

    Output on stable:

    [INFO] [stderr] warning: for loop over an `Option`. This is more readably written as an `if let` statement
    [INFO] [stderr]   --> lib/wasm/binary_derive/src/lib.rs:37:13
    [INFO] [stderr]    |
    [INFO] [stderr] 37 | /             quote!({
    [INFO] [stderr] 38 | |                 #( #check_tag )*
    [INFO] [stderr] 39 | |                 #decode_fields
    [INFO] [stderr] 40 | |             })
    [INFO] [stderr]    | |______________^
    [INFO] [stderr]    |
    [INFO] [stderr]    = note: `#[warn(for_loops_over_fallibles)]` on by default
    [INFO] [stderr] help: to check pattern in a loop use `while let`
    [INFO] [stderr]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/quote-0.4.2/src/lib.rs:379:29
    [INFO] [stderr]    |
    [INFO] [stderr] 379~         nested_tuples_pat!((while let Some(for pounded_var_names!(nested_tuples_pat () $($inner)*)
    [INFO] [stderr] 380~         nested_tuples_pat!(() = ) $($rest)*)
    [INFO] [stderr]    |
    [INFO] [stderr] help: consider using `if let` to clear intent
    [INFO] [stderr]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/quote-0.4.2/src/lib.rs:379:29
    [INFO] [stderr]    |
    [INFO] [stderr] 379~         nested_tuples_pat!((if let Some(for pounded_var_names!(nested_tuples_pat () $($inner)*)
    [INFO] [stderr] 380~         nested_tuples_pat!(() = ) $($rest)*)
    
  8. theemathas commented on Oct 23, 2025

    @theemathas
    Contributor

    Minimized-ish reproduction:

    use quote::*;
    
    fn main() {
        let name = Some(quote! { a });
        let translation = "a";
        let _ = quote!(#(#name:)* #translation);
    }
    [package]
    name = "repro"
    version = "0.1.0"
    edition = "2024"
    
    [dependencies]
    quote = "0.4"
    
  9. theemathas commented on Oct 23, 2025

    @theemathas
    Contributor

    Minimized reproduction:

    src/main.rs

    fn main() {
        let _name = Some(1);
        dep::do_loop!(_name);
    }

    dep/src/lib.rs

    #[macro_export]
    macro_rules! identity {
        ($x:ident) => {
            $x
        };
    }
    
    #[macro_export]
    macro_rules! do_loop {
        ($x:ident) => {
            for $crate::identity!($x) in $x {}
        };
    }

    Zip of all files needed for reproduction, for your convenience: repro.zip

  10. added
    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.
    on Oct 23, 2025
  11. 6 remaining items

  12. wesleywiser commented on Oct 23, 2025

    @wesleywiser
    Member

    Since #147849 is still waiting on the MCP, I wonder if we should revert #146121 for now.

  13. added 2 commits that reference this issue on Oct 24, 2025
  14. added this to the 1.91.0 milestone on Oct 24, 2025
  15. theemathas commented on Oct 25, 2025

    @theemathas
    Contributor

    Reverted in #148043 and backported in #148075. Should this issue be kept open for the invalid suggestion?

  16. theemathas commented on Oct 25, 2025

    @theemathas
    Contributor

    I've filed a separate issue for the invalid suggestion, so I'm closing this issue.

  17. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Nov 1, 2025
  18. added 2 commits that reference this issue on Mar 18, 2026
    ef13e46
    a65f8fe
  19. added a commit that references this issue on Mar 19, 2026
    052b068
  20. added 3 commits that reference this issue on Mar 19, 2026
    16f5a1f
    d07f611
    0c78b9a
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

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️L-for_loops_over_falliblesLint: for_loops_over_falliblesP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions