Skip to content

Ignore trailing commas in ExpectedDebug#455

Merged
Marwes merged 2 commits intolalrpop:masterfrom
teskje:ignore-trailing-comma-in-expected-debug
Apr 30, 2019
Merged

Ignore trailing commas in ExpectedDebug#455
Marwes merged 2 commits intolalrpop:masterfrom
teskje:ignore-trailing-comma-in-expected-debug

Conversation

@teskje
Copy link
Contributor

@teskje teskje commented Apr 28, 2019

rust-lang/rust/pull/59076 changed the multiline Debug representation to
always include a trailing comma. This change currently breaks our tests
on beta and nightly, since we use this Debug representation to compare
expected parsing output.

We cannot simply add the trailing commas to the expected output strings,
since that would break on older rustc versions we support. Instead, this
commit makes it so that all trailing commas are stripped before the
comparison.

This workaround can be removed once rust-lang/rust/pull/59076 reaches
our minimum supported rustc version.

rust-lang/rust/pull/59076 changed the multiline Debug representation to
always include a trailing comma. This change currently breaks our tests
on beta and nightly, since we use this Debug representation to compare
expected parsing output.

We cannot simply add the trailing commas to the expected output strings,
since that would break on older rustc versions we support. Instead, this
commit makes it so that all trailing commas are stripped before the
comparison.

This workaround can be removed once rust-lang/rust/pull/59076 reaches
our minimum supported rustc version.
That's required by the current version rustc-demangle, which is a
dependency of mdbook.
@Marwes Marwes merged commit 9b5ec5f into lalrpop:master Apr 30, 2019
@teskje teskje deleted the ignore-trailing-comma-in-expected-debug branch April 30, 2019 21:39
MiscStuff839 pushed a commit to MiscStuff839/lalrpop that referenced this pull request Nov 16, 2025
* Ignore trailing commas in `ExpectedDebug`

rust-lang/rust/pull/59076 changed the multiline Debug representation to
always include a trailing comma. This change currently breaks our tests
on beta and nightly, since we use this Debug representation to compare
expected parsing output.

We cannot simply add the trailing commas to the expected output strings,
since that would break on older rustc versions we support. Instead, this
commit makes it so that all trailing commas are stripped before the
comparison.

This workaround can be removed once rust-lang/rust/pull/59076 reaches
our minimum supported rustc version.

* Bump minimum Rust version to 1.31.0

That's required by the current version rustc-demangle, which is a
dependency of mdbook.
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.

2 participants