-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
doctests: Assertion panic message is escaped and is unreadable terrible on 2024 edition. #137970
Copy link
Copy link
Closed
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocA-edition-2024Area: The 2024 editionArea: The 2024 editionA-panicArea: Panicking machineryArea: Panicking machineryC-bugCategory: This is a bug.Category: This is a bug.I-edition-triagedIssue: This issue has been reviewed and triaged by the Edition team.Issue: This issue has been reviewed and triaged by the Edition team.P-highHigh priorityHigh priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocA-edition-2024Area: The 2024 editionArea: The 2024 editionA-panicArea: Panicking machineryArea: Panicking machineryC-bugCategory: This is a bug.Category: This is a bug.I-edition-triagedIssue: This issue has been reviewed and triaged by the Edition team.Issue: This issue has been reviewed and triaged by the Edition team.P-highHigh priorityHigh priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
I tried this code:
Running the doctests gives a terrible error message:
It should instead format the assertion error well, like it does on edition=2015
It works as expected on beta/stable
Possibly releated: https://users.rust-lang.org/t/question-about-doctest-speedup-in-rust-2024-edition/126431 / #137898
CC @notriddle @GuillaumeGomez