[rustdoc] Correctly handle should_panic doctest attribute and fix --no-run test flag on the 2024 edition#143900
[rustdoc] Correctly handle should_panic doctest attribute and fix --no-run test flag on the 2024 edition#143900GuillaumeGomez wants to merge 10 commits intorust-lang:masterfrom
should_panic doctest attribute and fix --no-run test flag on the 2024 edition#143900Conversation
|
This PR modifies cc @jieyouxu |
This comment has been minimized.
This comment has been minimized.
I... do not see anything like that in the patch? There's two checks for exit code 101. |
|
Woups, copied/pasted comment from original PR which was outdated after discussion with you (on the previous PR). ^^' EDIT: Updated comment. |
if langstr.should_panic {
if out.status.code() == Some(101) {
return Ok(());
} else if out.status.success() {
return Err(TestFailure::UnexpectedRunPass);
}
}
if !out.status.success() {
return Err(TestFailure::ExecutionFailure(out));
}Do you think something like this would make sense, so that it's easier for the user to differentiate between aborts and panic-less success? |
|
|
|
Wouldn't changing |
|
That wouldn't cover |
|
I've amended my comment a moment before you replied, apologies. |
|
Replied too fast then. 😅 The message for |
I think we're talking past each other. I suggest that:
Wouldn't that work? |
|
I still think it's too general. For end users, |
|
That makes sense, yeah. Let's delay it until after this PR lands then. |
|
☔ The latest upstream changes (presumably #144692) made this pull request unmergeable. Please resolve the merge conflicts. |
72aadc6 to
248c61c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
248c61c to
c365e6e
Compare
This comment has been minimized.
This comment has been minimized.
…Amanieu Make `libtest::ERROR_EXIT_CODE` const public to not redefine it in rustdoc I think it's better to make this constant public so it can be used by crates using `libtest` as dependency. As a side-note, I will update rust-lang#143900 to make use of this constant once this is current PR is merged.
|
Ah, this time a |
This comment has been minimized.
This comment has been minimized.
|
@bors try jobs=x86_64-gnu-aux,test-various |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This failure definitely illustrates why I should finish writing the lint in case the merged doctests failed compilation... |
|
@bors try jobs=x86_64-gnu-aux,test-various |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Some suggestions and questions. As requested, feel free to r=me once they're all addressed in one way or another.
Although, I've got to admit that I feel slightly uneasy about some of these changes or rather the fact that this will ship "insta-stably". Anyhow, it's probably fine.
Added missing FIXME comments
|
Let's go again then! @bors r=fmease |
|
Possibly failed in rollup in @bors r- |
|
@bors try jobs=armhf-gnu |
This comment has been minimized.
This comment has been minimized.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
💔 Test for 4d1b974 failed: CI. Failed jobs:
|
|
This has been buggy since 796c4ef because |
|
Superseded by #147674. |
|
@purplesyringa: Thanks for the comment! So the problem is actually that |
Fixes #143009.
Fixes #143858.
Since it includes fixes from #143453, it's taking it over (commits 2, 3 and 4 are from #143453).
For
--no-run, we forgot to check the "global" options in the 2024 edition, fixed in the first commit.For
should_panicfix, the exit code check has been fixed.cc @TroyKomodo (thanks so much for providing such a complete test, made my life a lot easier!)
r? @notriddle