Skip to content

panicked at crates/syntax/src/ast/make.rs:433:5 #22724

Description

@b-f-

rust-analyzer version: rust-lang.rust-analyzer 0.3.2946

rustc version: rustc 1.98.0-nightly (4429659e4 2026-06-22)

editor or extension: VSCodium
Version: 1.121.03429
Commit: 824c4c46a288b839f13b24022655329c2aeb9f81

relevant settings:

repository link (if public, optional):

code snippet to reproduce:
Image

#[derive(Component)]
pub (crate) struct Grid {
	columns: usize,
	rows: usize,
    cells: Vec<u8>,
}

Log

thread 'Worker0' (19583) panicked at crates/syntax/src/ast/make.rs:433:5:
Failed to make ast node `syntax::ast::generated::nodes::Path` from text fn f(x: ) {}
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: syntax::ast::make::ast_from_text_with_edition
   3: syntax::ast::make::path_from_segments
   4: ide_db::imports::merge_imports::split_prefix
   5: ide_db::imports::merge_imports::try_merge_trees_with_factory
   6: ide_db::imports::merge_imports::try_merge_imports
   7: ide_assists::handlers::merge_imports::merge_uses
   8: ide_assists::handlers::merge_imports::merge_imports
   9: ide_assists::assists
  10: ide::Analysis::assists_with_fixes
  11: rust_analyzer::handlers::request::handle_code_action
  12: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
additional context:
   0: 
version: 0.3.2946-standalone
request: textDocument/codeAction CodeActionParams {
    text_document: TextDocumentIdentifier {
        uri: Url {
            scheme: "file",
            cannot_be_a_base: false,
            username: "",
            password: None,
            host: None,
            port: None,
            path: "/home/bf/projects/tetris/src/systems/mod.rs",
            query: None,
            fragment: None,
        },
    },
    range: Range {
        start: Position {
            line: 5,
            character: 30,
        },
        end: Position {
            line: 5,
            character: 30,
        },
    },
    context: CodeActionContext {
        diagnostics: [
            Diagnostic {
                range: Range {
                    start: Position {
                        line: 5,
                        character: 30,
                    },
                    end: Position {
                        line: 5,
                        character: 30,
                    },
                },
                severity: Some(
                    Error,
                ),
                code: Some(
                    String(
                        "syntax-error",
                    ),
                ),
                code_description: Some(
                    CodeDescription {
                        href: Url {
                            scheme: "https",
                            cannot_be_a_base: false,
                            username: "",
                            password: None,
                            host: Some(
                                Domain(
                                    "doc.rust-lang.org",
                                ),
                            ),
                            port: None,
                            path: "/stable/reference/",
                            query: None,
                            fragment: None,
                        },
                    },
                ),
                source: Some(
                    "rust-analyzer",
                ),
                message: "Syntax Error: expected identifier, `self`, `super`, `crate`, or `Self`",
                related_information: None,
                tags: None,
                data: None,
            },
            Diagnostic {
                range: Range {
                    start: Position {
                        line: 5,
                        character: 30,
                    },
                    end: Position {
                        line: 5,
                        character: 30,
                    },
                },
                severity: Some(
                    Error,
                ),
                code: Some(
                    String(
                        "syntax-error",
                    ),
                ),
                code_description: Some(
                    CodeDescription {
                        href: Url {
                            scheme: "https",
                            cannot_be_a_base: false,
                            username: "",
                            password: None,
                            host: Some(
                                Domain(
                                    "doc.rust-lang.org",
                                ),
                            ),
                            port: None,
                            path: "/stable/reference/",
                            query: None,
                            fragment: None,
                        },
                    },
                ),
                source: Some(
                    "rust-analyzer",
                ),
                message: "Syntax Error: expected SEMICOLON",
                related_information: None,
                tags: None,
                data: None,
            },
        ],
        only: None,
        trigger_kind: Some(
            Automatic,
        ),
    },
    work_done_progress_params: WorkDoneProgressParams {
        work_done_token: None,
    },
    partial_result_params: PartialResultParams {
        partial_result_token: None,
    },
}

fatal runtime error: Rust cannot catch foreign exceptions, aborting
2026-07-04T18:09:57.982824213+02:00  WARN overly long loop turn took 957.40359ms:
(event handling took 47.749µs): Notification { method: "textDocument/didChange" }
(cancellation took Some(360ns))
                (garbage collection took Some(11.858167ms))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions