This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cargo has switched exclusively to
toml_edit
, so when downcastingerrors to get line and column, we need to downcast for those errors as
well.
This does not attempt to port rls to
toml_edit
and an analysis was notdone to verify if the
find_toml_error
code path only needs to checkfor one toml library.
The downside to this solution is its brittle. Any time cargo upgrades
through a breaking
toml_edit
version, this test will break again andwe'll have to upgrade rls to fix it.
The tracking of
manifest_error_range
was changed because I was originally exploring removing it. ReturningNone
didn't change the test to fail in a way I expected, so I pivoted to getline_col
intotoml_edit
. I felt the change did make the code better match intent and since it was a distinct commit, I kept it here. I can remove it if needed.