Repository navigation
rustdoc: don't panic on a nested use group with no path prefix - #164883
sreekaransrinath wants to merge 2 commits into
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @GuillaumeGomez (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
|
Please also test the following in edition 2015: mod what {
use {*};
} |
|
Please add the test as mentioned by @theemathas but otherwise looks good to me. |
Cover `mod { use {*}; }` in edition 2015 as requested in rust-lang#164883 review.
This comment has been minimized.
This comment has been minimized.
Cover `mod { use {*}; }` in edition 2015 as requested in review.
ccc2b06 to
71f85a5
Compare
|
added! ty @theemathas @GuillaumeGomez |
|
Thanks! @bors r=theemathas,GuillaumeGomez |
|
📌 Commit 71f85a5 has been tentatively approved by It will be put into the queue for this repository once PR CI succeeds. 🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened. Reason for tree closure: |
…ted-use, r=theemathas,GuillaumeGomez rustdoc: don't panic on a nested use group with no path prefix fixes rust-lang#164158 rustdoc panicked on a nested use group with no path in front of it, like `use {{}};` or `use {a, {b}};`, because `clean_use_statement` called `unwrap()` on the last segment of a path that had no segments. we now check the last segment with `is_some_and` instead, so the `self` handling only runs when there's a segment to look at the new test covers `use {{}};` and the nested shape from the crater run. i ran it locally and it panics at the same line without the fix and passes with it this is a stable-to-beta regression though, so it may be worth a beta backport
…ted-use, r=theemathas,GuillaumeGomez rustdoc: don't panic on a nested use group with no path prefix fixes rust-lang#164158 rustdoc panicked on a nested use group with no path in front of it, like `use {{}};` or `use {a, {b}};`, because `clean_use_statement` called `unwrap()` on the last segment of a path that had no segments. we now check the last segment with `is_some_and` instead, so the `self` handling only runs when there's a segment to look at the new test covers `use {{}};` and the nested shape from the crater run. i ran it locally and it panics at the same line without the fix and passes with it this is a stable-to-beta regression though, so it may be worth a beta backport
…ted-use, r=theemathas,GuillaumeGomez rustdoc: don't panic on a nested use group with no path prefix fixes rust-lang#164158 rustdoc panicked on a nested use group with no path in front of it, like `use {{}};` or `use {a, {b}};`, because `clean_use_statement` called `unwrap()` on the last segment of a path that had no segments. we now check the last segment with `is_some_and` instead, so the `self` handling only runs when there's a segment to look at the new test covers `use {{}};` and the nested shape from the crater run. i ran it locally and it panics at the same line without the fix and passes with it this is a stable-to-beta regression though, so it may be worth a beta backport
fixes #164158
rustdoc panicked on a nested use group with no path in front of it, like
use {{}};oruse {a, {b}};, becauseclean_use_statementcalledunwrap()on the last segment of a path that had no segments.we now check the last segment with
is_some_andinstead, so theselfhandling only runs when there's a segment to look atthe new test covers
use {{}};and the nested shape from the crater run. i ran it locally and it panics at the same line without the fix and passes with itthis is a stable-to-beta regression though, so it may be worth a beta backport