-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve option_and_then_some
lint
#5529
Improve option_and_then_some
lint
#5529
Conversation
/// ``` | ||
pub OPTION_AND_THEN_SOME, | ||
pub BIND_INSTEAD_OF_MAP, |
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.
Not a full review, but this will need to be registered as 'renamed' here:
rust-clippy/clippy_lints/src/lib.rs
Lines 1775 to 1779 in 77c23b7
pub fn register_renamed(ls: &mut rustc_lint::LintStore) { | |
ls.register_renamed("clippy::stutter", "clippy::module_name_repetitions"); | |
ls.register_renamed("clippy::new_without_default_derive", "clippy::new_without_default"); | |
ls.register_renamed("clippy::cyclomatic_complexity", "clippy::cognitive_complexity"); | |
ls.register_renamed("clippy::const_static_lifetime", "clippy::redundant_static_lifetimes"); |
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.
fixed.
Anyway I failed with renaming :) What should I do (or maybe undo) to fix problem with the lint link absence in CHANGELOG.md?
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.
Just remove the surrounding []
in line 318 of CHANGELOG, so it isn't a link anymore.
f546d30
to
5c65635
Compare
38fc5b7
to
abdaa7f
Compare
☔ The latest upstream changes (presumably #5509) made this pull request unmergeable. Please resolve the merge conflicts. |
ad329c2
to
82fcf4f
Compare
☔ The latest upstream changes (presumably #5563) made this pull request unmergeable. Please resolve the merge conflicts. |
- add `multispan_sugg_with_applicability` - not it gets `&str` instead of `String`, like in `diag.multispan_suggestion`
82fcf4f
to
e2c9df3
Compare
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.
LGTM, just one question
@@ -63,10 +63,10 @@ fn block_in_assert() { | |||
let opt = Some(42); | |||
assert!(opt | |||
.as_ref() | |||
.and_then(|val| { | |||
.map(|val| { |
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.
Was it changed because it triggered the bind_instead_of_map
lint?
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.
Yeap
@bors r+ thanks! |
📌 Commit e2c9df3 has been approved by |
…hansch Improve `option_and_then_some` lint fixed #5492 changelog: Improve and generalize `option_and_then_some` and rename it to `bind_instead_of_map`.
💔 Test failed - checks-action_test |
- rename it to bind_instead_of_map
e2c9df3
to
07f1edf
Compare
@phansch , bors checks need to be retried. |
@bors r+ |
📌 Commit 07f1edf has been approved by |
…hansch Improve `option_and_then_some` lint fixed #5492 changelog: Improve and generalize `option_and_then_some` and rename it to `bind_instead_of_map`.
💔 Test failed - checks-action_test |
@bors retry (Connection reset by peer (os error 104)) |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixed #5492
changelog: Improve and generalize
option_and_then_some
and rename it tobind_instead_of_map
.