Update Clippy by flip1995 · Pull Request #84427 · rust-lang/rust (original) (raw)
This is a quick-fix for an ICE in tabs_in_doc_comments
. The problem
was that we we're indexing into possibly multi-byte characters, such as '位'.
More specifically get_chunks_of_tabs
was returning indices into
multi-byte characters. Those were passed on to a Span
creation that
then caused the ICE.
This fix makes sure that we don't return indices that point inside a multi-byte character. However, we are still iterating over unicode codepoints, not grapheme clusters. So a seemingly single character like y̆ , which actually consists of two codepoints, will probably still cause incorrect spans in the output.
Only lint when into_iter
is an implementation of IntoIterator
Minor cleanups
Fix macro_use_import
ICE
fixes: rust-lang#7015
changelog: Fix macro_use_import
ICE
…ffen
Invalid null usage v2
This is continuation of rust-lang#6192 after inactivity.
I plan to move paths into the compiler as diagnostic items after this is merged.
fixes rust-lang#1703 changelog: none
This still applies the lint, and also adds a structured suggestion to rename it.
Use register_renamed
instead of register_removed
for uplifted lints
This still applies the lint, and also adds a structured suggestion to rename it.
changelog: Use register_renamed
instead of register_removed
for lints uplifted to rustc
…fn, r=flip1995
Remove debug_assert
from panic_in_result_fn
I couldn't find any documentation on debug_assert
that should be remove.
In my humble opinion, I would also like to argue that todo
and unreachable
shouldn't trigger this lint?
Related: rust-lang/rust-clippy#6082
r? @flip1995
changelog: Change panic_in_result_fn
to ignore debug_assert
and co macros
…arth
Fix false-positive debug_assert
in panic
This fixes a false-positive in clippy::panic
when debug_assert
is used with a message.
Fixes rust-lang/rust-clippy#7062.
changelog: Fix false-positive in panic
when debug_assert
is used with a message
…0, r=giraffate
Fix FP in single_component_path_imports
lint
Fix FP in single_component_path_imports
lint when the import is reused with self
, like in use self::module
.
Fixes rust-lang#5210
changelog: none
Deprecate filter_map
Since rust-lang#6591, filter_map
does not even lint filter().map()
. The cases that are still linted make no sense IMO. So this just removes/deprecates it.
changelog: Deprecate filter_map
lint
Closes rust-lang#3424 Fixes rust-lang#7050
…ishearth
Add a note on the issue rust-lang#5953
Hello,
I thought it would be better to have a note and warning about this issue considering it introduced an UB in the past even with the "Search on Github" feature.
changelog: Add a note on the issue rust-lang#5953 to the known problems section.
Introduce is_lang_ctor
changelog: none
Replaces is_some_ctor
and is_ok_ctor
. Removes many path usages.