Skip to content

unsafe semantic highlighting should only highlight unsafe operations and definitions #19101

Open
@Veykril

Description

@Veykril

Right now we highlight some things as unsafe when they aren't used as such, an example being

unsafe fn f() {}

let _ = f;

here we highlight the f in unsafe fn f which is correct as its the definition, but we also highlight it in let _ = f even though we aren't doing anything unsafe there. There is more instances of this for other constructs like &raw const MUTABLE_STATIC which is a safe operation. We should likely expose our unsafety hir analysis and make use of that for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-highlighting(semantic) token highlightingC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions