Skip to content

ref-data-not-available appears on hint of constant reference of constant on type contains &'static str member #20428

@CrazyboyQCD

Description

@CrazyboyQCD

rust-analyzer version: 0.3.2571

rustc version: rustc 1.90.0-nightly (f26e58023 2025-06-30)

editor or extension: VSCode

relevant settings:

repository link (if public, optional):

code snippet to reproduce:

struct A {
    name: &'static str,
}

const AA: A = A { name: "123" };
const AAA: &A = &AA;

Hint:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions