Skip to content

fn get_str<'a>() -> &'a str; isn't pointlessly generic #4

Closed
@heftig

Description

@heftig

There's an actual difference between fn get_str<'a>() -> &'a str; and fn get_str() -> &'static str;. There wasn't until rust-lang/rust#42417 got merged, but since then <'a> will work in some cases where a simple 'static will not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions