Skip to content

#[derive(Default)] on ParserContext - #4

Merged
stefnotch merged 1 commit into
stefnotch:mainfrom
sjwang05:fix-trivial-bound
Sep 2, 2026
Merged

stefnotch merged 1 commit into
stefnotch:mainfrom
sjwang05:fix-trivial-bound

Conversation

@sjwang05

Copy link
Copy Markdown
Contributor

Hi there! This project surfaced while assessing what potential breakage PR rust-lang/rust#159118 would cause to the Rust ecosystem. The PR fixes a bug in the compiler where some unsatisfiable where-clauses would be allowed to compile without error.

Unfortunately, after this fix, this project will no longer compile, since the code generated by lelwel contains a Default bound that ParserContext doesn't satisfy. To allow the code to continue to compile, this PR just adds a #[derive(Default)] on ParserContext. lelwel itself also has an open PR addressing the Default bound in question: 0x2a-42/lelwel#70

For reference, the full list of build failures caused by the rustc PR can be found here: https://crater-reports.s3.amazonaws.com/pr-159118/index.html

@stefnotch

stefnotch commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Woah, one of my projects was special enough to exercise an edge case in the Rust compiler. This is kind of cool.

Thank you so much for the info and the PR! I'll also try to do the lelwel update as well so that this project keeps being up to date and useful for future crater runs.

@stefnotch
stefnotch merged commit 190bb46 into stefnotch:main Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants