Skip to content

Conversation

@cyrgani
Copy link
Contributor

@cyrgani cyrgani commented Nov 4, 2025

Currently, there are only few tests that check the output of TokenStream::from_str and Literal::from_str (which is somewhat understandable as the rustc implementation just delegates these calls to the parser). In preparation for both the standalone backend (#130856) which will probably need to reimplement this logic as well as for removing panics from these functions (#58736), this PR adds a test which shows the various messy ways of how these functions report errors and the return values for successful parses.
Followup PRs such as #147859 will change more and more of these "diagnostic + error"s into LexErrors.

The test structure with the extra module is used to allow reusing it later easily for the standalone backend.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 4, 2025

r? @madsmtm

rustbot has assigned @madsmtm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants