Skip to content

Span for external data files. #2869

@crlf0710

Description

@crlf0710

When writing proc macro, sometimes it's convenient to parse external data file and generate code accordingly. It would be nice to allow creating Spans corresponding to byte ranges within the data file, and use them in compiler diagnostics information.

One specific example where the external data is a piece of Rust code, is at dtolnay/request-for-implementation#47 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions