Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify that spans point to char boundaries #106192

Closed
wants to merge 3 commits into from

Commits on Jan 12, 2024

  1. Verify that spans point to char boundaries

    This makes invalid spans a lot easier to debug. A quick and unscientific
    benchmarking test revealed that the performance impact of this is small
    at most.
    Noratrieb committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    72cfa0a View commit details
    Browse the repository at this point in the history
  2. Fix SourceMap::start_point for empty spans

    When the span is empty, it doesn't really have a first character. Even
    worse, when it's empty at the end of the file, adding a byte offset will
    make it be out of bounds. So we just return the empty span in these
    cases.
    Noratrieb committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    b8e865d View commit details
    Browse the repository at this point in the history
  3. fmt

    Noratrieb committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    bc8aa22 View commit details
    Browse the repository at this point in the history