Skip to content

Possible Incompleteness #16734

Closed
Closed
@YichiZhang0613

Description

@YichiZhang0613

In rust-analyzer-master/crates/hir-expand/src/name.rss, I think the code should check text.len() <= 22 as comments mentioned before use text to avoid possible incompleteness.

/// Shortcut to create inline plain text name. Panics if `text.len() > 22`
    const fn new_static(text: &'static str) -> Name {
        Name::new_text(SmolStr::new_static(text))
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions