-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjusted some doctests in libcore to use should_panic
.
#73302
Conversation
Previously, some doctests were spawning new threads and joining them to indicate that a particular call should panic; this hurt readability, so the tests have been adjusted to simply call the method and use the `should_panic` marker.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @hanna-kruppe (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks! @bors r+ |
📌 Commit 3ab4b38 has been approved by |
This looks like it hits all of the cases I can quickly find by grepping so let's go ahead, we can always have more PRs later if necessary :) @bors r+ rollup |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 3ab4b38 has been approved by |
oh gah, Github decided not to show the previous comment. ignore me :) |
Rollup of 8 pull requests Successful merges: - rust-lang#72932 (Clarify the behaviour of Pattern when used with methods like str::contains) - rust-lang#73066 (Querify whether a type has structural equality (Take 2)) - rust-lang#73194 (Prefer the associated constants for pattern matching error) - rust-lang#73241 (Add/update comments about MinGW late_link_args) - rust-lang#73267 (Use the built cargo for cargotest.) - rust-lang#73290 (Fix links when pinging notification groups) - rust-lang#73302 (Adjusted some doctests in libcore to use `should_panic`.) - rust-lang#73308 (pretty/asm.rs should only be tested for x86_64 and not AArch64) Failed merges: r? @ghost
Fixes #73196 .
I grepped libstd and libcore for all the instances of this pattern that I could find, but its possible that I missed some of course. If anyone knows of any more, please let me know and I will add them to the PR.