Fix 2024 edition doctest panic output#139328
Merged
bors merged 3 commits intorust-lang:masterfrom Apr 5, 2025
Merged
Conversation
fmease
reviewed
Apr 3, 2025
5079630 to
409f08b
Compare
This comment has been minimized.
This comment has been minimized.
409f08b to
f9927ee
Compare
Member
Author
|
Didn't expect that even the stacktrace would be an issue. Removed it with |
Member
|
I'm not familiar enough with this code to know if it's ok to move from returning the error to printing it now. It seems fine in the one test here, but I'm worried about interleaving I'm not thinking about. I will say it feels like there should be more tests, but also I don't super know what they should look like, so maybe it's fine. r? rustdoc (I don't know who else works on doctests) |
fmease
approved these changes
Apr 4, 2025
Member
|
r? fmease @bors r+ rollup |
Collaborator
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Apr 4, 2025
…7970, r=fmease Fix 2024 edition doctest panic output Fixes rust-lang#137970. The problem was that the output was actually displayed by rustc itself because we're exiting with `Result<(), String>`, and the display is really not great. So instead, we get the output, we print it and then we return an `ExitCode`. r? `@aDotInTheVoid`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Apr 4, 2025
…7970, r=fmease Fix 2024 edition doctest panic output Fixes rust-lang#137970. The problem was that the output was actually displayed by rustc itself because we're exiting with `Result<(), String>`, and the display is really not great. So instead, we get the output, we print it and then we return an `ExitCode`. r? ``@aDotInTheVoid``
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 4, 2025
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#138546 (Add integer to string formatting tests) - rust-lang#138950 (replace extra_filename with strict version hash in metrics file names) - rust-lang#139028 (Make target maintainers more easily pingable) - rust-lang#139274 (Rustdoc: typecheck settings.js) - rust-lang#139275 (Update the minimum external LLVM to 19) - rust-lang#139328 (Fix 2024 edition doctest panic output) Failed merges: - rust-lang#138947 (Refactor Apple version handling in the compiler) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Apr 4, 2025
…7970, r=fmease Fix 2024 edition doctest panic output Fixes rust-lang#137970. The problem was that the output was actually displayed by rustc itself because we're exiting with `Result<(), String>`, and the display is really not great. So instead, we get the output, we print it and then we return an `ExitCode`. r? ```@aDotInTheVoid```
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 4, 2025
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#138546 (Add integer to string formatting tests) - rust-lang#138950 (replace extra_filename with strict version hash in metrics file names) - rust-lang#139028 (Make target maintainers more easily pingable) - rust-lang#139274 (Rustdoc: typecheck settings.js) - rust-lang#139328 (Fix 2024 edition doctest panic output) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 4, 2025
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#139041 (Remove `rustc_middle::ty::util::ExplicitSelf`.) - rust-lang#139328 (Fix 2024 edition doctest panic output) - rust-lang#139339 (unstable book: document tait) - rust-lang#139348 (AsyncDestructor: replace fields with impl_did) - rust-lang#139353 (Fix `Debug` impl for `LateParamRegionKind`.) - rust-lang#139366 (ToSocketAddrs: fix typo) - rust-lang#139374 (Use the span of the whole bound when the diagnostic talks about a bound) - rust-lang#139378 (Use target-agnostic LLD flags in bootstrap for `use-lld`) - rust-lang#139384 (Add `compiletest` adhoc_group for `r? compiletest`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 5, 2025
Rollup merge of rust-lang#139328 - GuillaumeGomez:fix-panic-output-137970, r=fmease Fix 2024 edition doctest panic output Fixes rust-lang#137970. The problem was that the output was actually displayed by rustc itself because we're exiting with `Result<(), String>`, and the display is really not great. So instead, we get the output, we print it and then we return an `ExitCode`. r? ````@aDotInTheVoid````
Member
|
Beta backport accepted as per #t-rustdoc > beta-nominated: #139328 @ 💬 |
Merged
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 19, 2025
[beta] backports - Fix 2024 edition doctest panic output rust-lang#139328 - make `Arguments::as_statically_known_str` doc(hidden) rust-lang#139389 - Revert "Deduplicate template parameter creation" rust-lang#139878 - sync::mpsc: prevent double free on `Drop` rust-lang#139553 r? cuviper
ChrisDenton
added a commit
to ChrisDenton/rust
that referenced
this pull request
Apr 19, 2025
…kport-poll, r=aDotInTheVoid
Add option for stable backport poll
When creating polls on Zulip about stable backport ("Do we approve the backport of `rust-lang#12345`"?), stable backports should have the option of "approving, but only is a dot release is planned" (this is a hint to t-release about how the team think important - or not - is backporting some patch).
Discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stable-nominated.3A.20.23139328/near/510037866)[#t-rustdoc > stable-nominated: rust-lang#139328 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stable-nominated.3A.20.23139328/near/510037866)
r? `@aDotInTheVoid` (feel free to adjust the wording!)
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 20, 2025
Rollup merge of rust-lang#140039 - apiraino:add-option-for-stable-backport-poll, r=aDotInTheVoid Add option for stable backport poll When creating polls on Zulip about stable backport ("Do we approve the backport of `rust-lang#12345`"?), stable backports should have the option of "approving, but only is a dot release is planned" (this is a hint to t-release about how the team think important - or not - is backporting some patch). Discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stable-nominated.3A.20.23139328/near/510037866)[#t-rustdoc > stable-nominated: rust-lang#139328 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stable-nominated.3A.20.23139328/near/510037866) r? `@aDotInTheVoid` (feel free to adjust the wording!)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #137970.
The problem was that the output was actually displayed by rustc itself because we're exiting with
Result<(), String>, and the display is really not great. So instead, we get the output, we print it and then we return anExitCode.r? @aDotInTheVoid