-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
add diagnostic items for OsString/PathBuf/Owned as well as to_vec on slice #82128
Conversation
Add diagnostic items to the following types: OsString (os_string_type) PathBuf (path_buf_type) Owned (to_owned_trait) As well as the to_vec method on slice/[T]
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @davidtwco (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. |
I'm hoping to resolve some questions that I raised on Zulip.
|
@@ -220,6 +220,7 @@ mod hack { | |||
} | |||
|
|||
#[lang = "slice_alloc"] | |||
#[cfg_attr(not(test), rustc_diagnostic_item = "slice")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure on this being slice
-- I see the symbol was already there, but as far as I can tell wasn't being used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me. sym::slice
is used in rustc_hir::lang_items::LangItem::Slice::name()
but it doesn't really matter.
And I think this is now everything I need for the clippy PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay in getting to this review - have you been able to confirm that this is sufficient for your clippy PR?
@bors r+ |
📌 Commit 67fcaaa has been approved by |
… r=davidtwco add diagnostic items for OsString/PathBuf/Owned as well as to_vec on slice This is adding diagnostic items to be used by rust-lang/rust-clippy#6730, but my understanding is the clippy-side change does need to be done over there since I am adding a new clippy feature. Add diagnostic items to the following types: OsString (os_string_type) PathBuf (path_buf_type) Owned (to_owned_trait) As well as the to_vec method on slice/[T]
Rollup of 12 pull requests Successful merges: - rust-lang#79423 (Enable smart punctuation) - rust-lang#81154 (Improve design of `assert_len`) - rust-lang#81235 (Improve suggestion for tuple struct pattern matching errors.) - rust-lang#81769 (Suggest `return`ing tail expressions that match return type) - rust-lang#81837 (Slight perf improvement on char::to_ascii_lowercase) - rust-lang#81969 (Avoid `cfg_if` in `std::os`) - rust-lang#81984 (Make WASI's `hard_link` behavior match other platforms.) - rust-lang#82091 (use PlaceRef abstractions more consistently) - rust-lang#82128 (add diagnostic items for OsString/PathBuf/Owned as well as to_vec on slice) - rust-lang#82166 (add s390x-unknown-linux-musl target) - rust-lang#82234 (Remove query parameters when skipping search results) - rust-lang#82255 (Make `treat_err_as_bug` Option<NonZeroUsize>) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This is adding diagnostic items to be used by rust-lang/rust-clippy#6730, but my understanding is the clippy-side change does need to be done over there since I am adding a new clippy feature.
Add diagnostic items to the following types:
OsString (os_string_type)
PathBuf (path_buf_type)
Owned (to_owned_trait)
As well as the to_vec method on slice/[T]