Skip to content
TheChatArchiveThe Chat Archive
gpt-5.6-sol· openaiHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Cannot complete macro path in macro <!-- Troubleshooting guide:…

  1. User

    Cannot complete macro path in macro

    rust-analyzer version: rust-analyzer 0.4.2897-standalone

    rustc version: rustc 1.97.0-nightly (36ba2c771 2026-04-23)

    editor or extension: Vim

    code snippet to reproduce:

    macro_rules! bar { () => (); }
    macro_rules! foo { ($i:ident) => { $i!() }; }
    fn main() {
        foo!(bar$0);
    }
    

    Interface

    No new interfaces are introduced.

  2. Assistant

    I’ll trace macro-call completion handling, add a focused regression test for this fixture, then run the narrow test suite and any relevant formatting/tidy checks.

  3. Assistant

    rg isn’t installed in this checkout, so I’m switching to git grep and keeping the search scoped to completion code.

  4. Assistant

    The failure is in recursive speculative expansion: after foo! expands to bar!(), completion sees bar as “inside a macro call” and insists on expanding again. But the cursor is on that call’s path, not in its arguments, so expansion cannot proceed and the completion context is discarded. I’m narrowing that stopping condition to recognize macro-call paths as valid completion sites.

  5. Assistant

    The focused regression now passes and verifies the applied edit remains foo!(bar)—the expansion supplies the !(), so completion must not insert a second macro invocation. Formatting and whitespace checks are clean; I’m running the full ide-completion test suite next.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.