mikerite/ebook-clipper-webextension 1
A Firefox extension for creating eBooks from page clippings
The Rust package manager
Are the contents of two directories different?
mikerite/mirror-video-webextension 0
A web extension that adds a browser action to mirror video
A safe, concurrent, practical language.
A bunch of lints to catch common mistakes and improve your Rust code
The Rust Playground
Format Rust code
issue openedrust-lang/rust-clippy
`mistyped_literal_suffixes` false positive and bad suggestion
let _ = 123_32.123;
I expected to see this happen: mistyped_literal_suffixes not to fire
Instead, this happened:
let _ = 123_32.123;
| ^^^^^^^^^^ help: did you mean to write: `123.123_f32`
created time in 13 days
pull request commentrust-lang/rust-clippy
Change Constant::Binary back to refcount clone byte strings
Is this pull request needed? I think the change should get synced from rust after that pull request is merged.
comment created time in 15 days
PR opened rust-lang/rust-clippy
Fixes #6096
changelog: Fixed bug in clippy::inconsistent_digit_grouping when floating point exponent is used
pr created time in 18 days
issue commentrust-lang/rust-clippy
inconsistent_digit_grouping is inconsistent when a floating point exponent used
I'll fix this one.
comment created time in 19 days
issue openedrust-lang/rust-clippy
Minimum supported version of Rust (MSVR) config and support
Many lints suggest using new features in the std lib like clippy::manual_strip. I think these are great because they help people upgrade their code to take advantage of these features. However, there are many projects that support old versions of Rust that can't use these. These lints only make more work for those projects because they have to allows to fix their CI. See this recent commit in serde-yaml for example.
I'd like to add a key to clippy.toml to specify the minimum version of rust (and the stdlib) that a project supports. We can conditionally register these lints that target features not supported on that version based on that config.
I understand that eventually proper support for this will be added to Cargo and rustc to support this but at that stage we can just deprecate the setting and use the new stuff.
created time in 21 days
pull request commentrust-lang/rust-clippy
I haven't tested this Windows. I can rely on CI to do that, right?
comment created time in 25 days
PR opened rust-lang/rust-clippy
rust-lang/rustfmt#1873 was fixed earlier this year.
changelog: none
pr created time in 25 days
issue commentrust-lang/rust-clippy
The other PR used the term 'disallowed' so maybe go with disallowed_method. I probably not the right person to answer this.
comment created time in a month
issue commentrust-lang/rust-clippy
Apparently we don't use the term "blacklist" anymore - #5896 . Maybe choose something else if you don't want someone to come along and rename it.
comment created time in a month
issue commentrust-lang/rust-clippy
Manual Duration::{as_nanos,as_milis,as_secs_f64,as_secs_f32} implementation
I think duration_subsec should be renamed to manual_duration_calcs and extended to handle cases.
I think the minimum supported rust version is an issue an that needs to be handled globally for this project. I wouldn't even think about it while implementing this.
comment created time in a month
pull request commentrust-lang/rust-clippy
Add new lint `unnecessary_wrap`
This lint looks really similar to the unnecessary_filter_map lint. I think you should probably reuse some code between them particularly the visitor. I've also seen the same visitor implemented in bind_instead_of_map but it looked much more complicated. I get the feeling the one in this PR is missing some edge cases.
comment created time in a month
issue commentrust-lang/rust-clippy
Suggest replacing filter-for-some-and-unwrap with .flatten
I meant replacing the map(..).flatten(..) chain with filter_map. In fact we already have a pedantic lint, clippy::map_flatten, which triggers on the recommendation.
comment created time in a month
issue commentrust-lang/rust-clippy
Suggest replacing filter-for-some-and-unwrap with .flatten
Shouldn't the recommendation itself be linted to use filter_map?
comment created time in a month
push eventmikerite/rust-clippy
commit sha 2ecc2ac864739cff6aed2609021e2467dedb117a
unit-arg - improve suggestion
commit sha baf62e7a38854ff6a0039ddccb124ff329a32143
Update changelog to beta 1.47
commit sha 04bff17668be1305d9efe235665a32727ff3e0b5
Fix FP in `to_string_in_display` Don't emit a lint when `.to_string()` on anything that is not `self`
commit sha 2a3ee5fa854b49530008582900c6ea7fac120d1c
Fix FP in `new_ret_no_self`: trigger in trait def instead of impl block
commit sha 3cb75c2e5cdd4f450f2974c5e052d569674d95fd
Remove expansion restriction + fix doc and tests naming
commit sha 504612622f2801b43dbe3e6788d2404d394376df
Merge logic of looking for `Self` type
commit sha f3ccbef2af24d5d83f82f1fb50bd97a9b75e609f
unit-arg - pr comments
commit sha 459969f88ff95c94b7b34043a7f0e13de91de4f8
added restriction lint that prohibits the usage of unimplemented, unreachable or panic in a function of type result or option
commit sha ceab1a9167655eba9f9556f8766f8702e49dfef3
removed unnecessary comment
commit sha 8462cce96081b87eba7a5bc89130a1a09fe1f6d0
edited documentation
commit sha 07c5e9edb5db8723b15573eb6ebe183fddbc5d33
Auto merge of #5971 - giraffate:fix_fp_in_to_string_in_display, r=ebroto Fix FP in `to_string_in_display` Don't emit a lint when `.to_string()` on anything that is not `self` Fix #5967 changelog: Fix FP in `to_string_in_display` when calling `.to_string()` on anything that is not `self`
commit sha b2d8ca9a766703469178ea37d4d46067bb6fa926
ran cargo dev update lints
commit sha b006522393a3c3c2656e1ccdfbb0076ff1bd7e99
added lint for todo and removed option
commit sha e8be047c5b2d5b1522a16b4b52cc7acfa4581ca3
Update clippy_lints/src/utils/mod.rs Co-authored-by: Eduardo Broto <[email protected]>
commit sha ffaadae8e48699f115eafd2853c252f546a69a28
Update clippy_lints/src/utils/mod.rs Co-authored-by: Eduardo Broto <[email protected]>
commit sha 73b1ee1a614aaad7dd43958280ff4a444c8b737e
Update clippy_lints/src/methods/mod.rs Co-authored-by: Eduardo Broto <[email protected]>
commit sha 5574182b4d2d08c848a88a1ac5633fc194e0465e
Add a new lint to prevent `create_dir` from being used
commit sha 607905d126c55422668007737c22d7a7a89c0d57
Add STD_FS_CREATE_DIR into paths
commit sha 34e302e67c08c9b97d58d062ea83cc1fd860c56e
Fix clippy error
commit sha eebd2483654456e332d7cf53218b56b9cbd6f2f5
Fix errors
push time in a month
delete branch mikerite/rust-clippy
delete branch : default-trait-access-20200904
delete time in a month
pull request commentrust-lang/rust-clippy
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author
comment created time in a month
push eventmikerite/rust-clippy
commit sha e49a29933be3bd988ccb75b053f480d9c99a7ff5
Working map_err_ignore lint
commit sha 202a80c927412a548180eca5990ee764d76ed643
Added tests for map_err, ignored map_err lint on drop_ref tests
commit sha 337729137bdec31b55665653ef0cf7dc124b0eaa
Ran cargo dev update_lints
commit sha 2387f68e437bf2ff5f117f63936257ce64052cfa
Removed map_err suggestion in lint, and updated lint documentation example
commit sha c31d4730b0d40c62934839405d0c25e2ffa3fad1
update example to be more idiomatic
commit sha 4f1c4a99d4d98f1acea3c9c7cc55355aa46119aa
Fixed typo in lint and test
commit sha d719b485434eac557e65bf55cca79e63f7b83d5b
Move map_err_ignore from style to pedantic
commit sha f82e84c8943e70300ad1f4de46d8d7bd889c6bde
Auto merge of #5998 - deg4uss3r:master, r=yaahc Add map_err_ignore lint In a large code base a lot of times errors are ignored by using something like: ```rust foo.map_err(|_| Some::Enum)?; ``` This drops the original error in favor of a enum that will not have the original error's context. This lint helps catch throwing away the original error in favor of an enum without its context. --- *Please keep the line below* changelog: Added map_err_ignore lint
commit sha 4d73ccaa9419b393b9c94f977ec0e158897feeb3
clarify margin of error in wording of float comparison operator lint messages
commit sha fd151f5135def6ffae7530f17ff0c458239f209d
Remove an extra blank line in `shadow_same`
commit sha 8afa7ed6aec37c5423cffe12dbc854c954799fb3
Add internal lint MatchTypeOnDiagItem
commit sha 332c2dcb4dfe5151d7c8d44cdf96c4abd06db593
Fix dogfood after MatchTypeOnDiagItem
commit sha c86a7e5f38e54f4404cc71874316eb0b4dba200b
Misc doc updates
commit sha d0b5663d30457d1a9ec4f98eb9baff7123b77172
Fix usage of backquotes in suggestion
commit sha 12ce312bb239aa0a347fd9d03fabb2a9f84bfe10
Auto merge of #6013 - ebroto:diagnostic_item_restriction, r=flip1995 Internal lint: suggest `is_type_diagnostic_item` over `match_type` where applicable changelog: none
commit sha 78f9ea543154b6a0d6b5b5a86e92d8cc1938b436
Fix clippy hard-code slice::Iter path
commit sha 9f0f035fe0b800adef73864cdcc1c1b528c80547
Auto merge of #6045 - giraffate:remove_extra_blank_line, r=flip1995 Remove an extra blank line in `shadow_same` It seems to be an extra blank line in doc example. changelog: none <img width="1143" alt="スクリーンショット 2020-09-15 8 50 30" src="https://user-images.githubusercontent.com/17407489/93149409-369df080-f731-11ea-9a39-d8bbc72b61ee.png">
commit sha 16b6cebaa67655a793d90d296c03e2c5496ec4ce
update lint docs
commit sha 190c6ea3690a20024ebc80eefbf91dba0e7fda5f
Auto merge of #6049 - flip1995:rustup, r=flip1995 Fix clippy hard-code slice::Iter path r? `@ghost` changelog: none
commit sha 0695f219945e22d092aa1351a5862abcb4e1f3c3
Auto merge of #6043 - HaramanJohal:margin_of_error, r=matthiaskrgr clarify margin of error in wording of float comparison operator lint messages fixes #6040 changelog: change wording of float comparison operator to make margin of error less ambiguous
push time in a month
PR opened rust-lang/rust-clippy
Add manual-strip lint.
changelog: Add manual-strip lint
pr created time in a month
pull request commentrust-lang/rust-clippy
Maybe the fix has landed. @bors retry
comment created time in a month
pull request commentrust-lang/rust-clippy
Is it failing due to rust-lang/rustup#2485 ?
comment created time in a month
issue commentrust-lang/rust-clippy
New lint: Suggest `str::strip_*` over `str::{starts,ends}_with` and slicing it
I started on this. I should have a pull request ready sometime soon.
comment created time in a month
pull request commentrust-lang/rust-clippy
Internal lint: suggest `is_type_diagnostic_item` over `match_type` where applicable
If you agree I would go with merging this before, knowing it only addresses a part of the problem. I think it can be helpful to avoid missing it in the reviews.
I think it's an good improvement as is. I'm happy with whatever you and the reviewer decide.
comment created time in a month
issue commentrust-lang/rust-clippy
false positives and crazy suggestsiong for unit_arg lint
It looks like this lint is working as intended to me.
Are you saying that isn't Ok(self.ram.set_word(addr, value)) equivalent to self.ram.set_word(addr, value); Ok(()) ? Why not?
comment created time in a month
pull request commentrust-lang/rust-clippy
Internal lint: suggest `is_type_diagnostic_item` over `match_type` where applicable
This is a great idea.
Is there any reason to save the path to a diagnostic item at all? I think it might be easier to loop through the lines of utils/path.rs and apply the check there.
Maybe you could make a similar lint to check for lang items as well.
comment created time in a month
issue commentrust-lang/rust-clippy
Unable to allow same_item_push on beta and released Rust version
Or allow clippy::unknown-clippy-lints
comment created time in 2 months
PR opened rust-lang/rust-clippy
Remove repeated matching on the same QPath.
changelog: none
pr created time in 2 months
create barnchmikerite/rust-clippy
branch : default-trait-access-20200904
created branch time in 2 months
PR opened rust-lang/rust-clippy
Related rust pull request: rust-lang/rust#76160
changelog: none
pr created time in 2 months
pull request commentrust-lang/rust-clippy
Fix the wrong use of `snippet_with_applicability`
Thanks, I also took a look at how to fix this, let's see if my plan works during the weekend.
Fixed something similar in #4164. It would probably work for #5822 as well. Assuming the functions show up as mutated variables.
comment created time in 2 months
push eventmikerite/rust-clippy
commit sha 902b28275ef6e06826f269bdf2459c4ba4562145
Improve lint message in `to_string_in_display`
commit sha b57ef14290a91bceebe925bb30a844e89d1de05b
Auto merge of #5926 - giraffate:improve_lint_message_in_to_string_in_display, r=yaahc Improve lint message in `to_string_in_display` This is a follow-up of https://github.com/rust-lang/rust-clippy/pull/5831. changelog: none
commit sha 03bc7aed441240190030c9dfdcce6405014178dd
Add async test case for `wrong_self_convention` lint
commit sha a8520b06365013cb5777f21cfc2672ab6f2cc21d
Auto merge of #5934 - ThibsG:WrongSelfTestCase4037, r=ebroto Add async test case for FP in `wrong_self_convention` lint Closes: #4037 changelog: none r? @ebroto
commit sha 191b6c798fa40334ec8898d07b4d28fd76743120
Don't lint if it has always inline attribute
commit sha 5b07b9ed61d1979320e9e63219b5d0d6f4b350f7
Widen understanding of prelude import Prelude imports are exempt from wildcard import warnings. Until now only imports of the form ``` use ...::prelude::*; ``` were considered. This change makes it so that the segment `prelude` can show up anywhere, for instance: ``` use ...::prelude::v1::*; ``` Fixes #5917
commit sha 53508aeb65963c389233c956105202466128a900
Run sh tests/ui/update-all-references.sh
commit sha e615a26ae4fe293cda83961470907e78e4b2ee75
Use more elegant way to check for prelude string
commit sha f21d10b970c2ff7216dc1ae2e9b7c0e8610eed2a
Auto merge of #5929 - stchris:issues/5917, r=ebroto Widen understanding of prelude import Prelude imports are exempt from wildcard import warnings. Until now only imports of the form ``` use ...::prelude::*; ``` were considered. This change makes it so that the segment `prelude` can show up anywhere, for instance: ``` use ...::prelude::v1::*; ``` Fixes #5917 changelog: Allow `prelude` to appear in any segment of the import path in [`wildcard_imports`]
commit sha dd07860b839a46782e3750a8924ecf380486c460
Auto merge of #5941 - ThibsG:InlineInCopyPassByRef, r=yaahc Don't lint if it has always inline attribute Don't trigger the lint `trivially_copy_pass_by_ref` if it has `#[inline(always)]` attribute. Note: I am not particularly familiar with `inline` impacts, so I implemented this the way that if only `#[inline]` attribute is here (without `always`), the lint will still trigger. Also, it will still trigger if it has `#[inline(never)]`. Just tell me if it sounds too much conservative. Fixes: #5876 changelog: none
commit sha e8d33d73dc3f9d0daf9b3affe65a2431f5a3e13a
Fix `let_and_return` bad suggestion Add a cast to the suggestion when the return expression has adjustments. These adjustments are lost when the suggestion is applied. This is similar to the problem in issue #4437. Closes #5729
commit sha 6dd65b8e6a548071b19507826c53bf9a7c36b323
Fix cargo dev new_lint for late lint passes
commit sha eb8ede7f659da6c07d1f475aff9b0d46e5b49a79
Improve documentation related to the sync process
commit sha 8776db9f6d5163ca40232336dc51ad77eeb2b5e5
Fix ICE in `repeat_once` lint
commit sha 91b200c62b7c464cb890c68230ab2d74605a60d0
Fix fp in `borrow_interior_mutable_const` Fix false positive when referencing a field behind a pointer.
commit sha 2d86cc5a33dd4a7cb586ab28822cdfceace92816
Auto merge of #5930 - ebroto:dev_newlint_fix_lt, r=matthiaskrgr Fix cargo dev new_lint for late lint passes Since https://github.com/rust-lang/rust-clippy/commit/30c046ede47ea45a772d2656b0365a4807263bca, `LateLintPass` has only one lifetime parameter. I'm not sure how to easily test this, I think adding this kind of tests would be probably part of #5394 changelog: none
commit sha 27ae4d303ce9103a104c57088913741ab17f4d36
Auto merge of #5948 - ebroto:5944_repeat_ice, r=Manishearth Fix ICE in `repeat_once` changelog: Fix ICE in [`repeat_once`] Fixes #5944
commit sha b05077ea75f4585551650fc2d40a196ae437393d
Apply suggestions from PR review
commit sha b2c226679251bb795d786d7cdd11d2e2c9d0e685
Fix FP for `redundant_closure_call` Visit the nested things like function body when checking closure call.
commit sha 9fe0ac36a53dfba14f5f33f5bab2fd243fb2c18e
Avoid period in lint message according to convention
push time in 2 months
pull request commentrust-lang/rust-clippy
Fix `let_and_return` bad suggestion
I tried enabling the rustfix but none of the suggestions were applied. Does rustfix work with multi-part suggestions?
comment created time in 2 months
PR opened rust-lang/rust-clippy
Various fmt test improvements.
changelog: none
pr created time in 2 months
pull request commentrust-lang/rust-clippy
Fix FP for `redundant_closure_call`
LGTM.
Let's see if this works... @bors r+
comment created time in 2 months
issue commentrust-lang/rust-clippy
trivially_copy_pass_by_ref does not consider pointers
Just to make this clear. The fix is to check if the return type contains a pointer on any level and avoid linting if it does. Right?
comment created time in 2 months
PR opened rust-lang/rust-clippy
Add a cast to the suggestion when the return expression has adjustments. These adjustments are lost when the suggestion is applied.
This is similar to the problem in issue #4437.
Closes #5729
changelog: Fix let_and_return bad suggestion
pr created time in 2 months
pull request commentrust-lang/rust-clippy
option_if_let_else - distinguish pure from impure else expressions
I like clippy would be more consistent overall if this lint used the logic in unnecessary_lazy_evaluations. You could also reuse that code.
comment created time in 2 months
push eventmikerite/rust-clippy
commit sha 191b0806d2decdb28e610c4ee8b42cb850798246
Capture tokens for Pat used in macro_rules! argument This extends PR #73293 to handle patterns (Pat). Unlike expressions, patterns do not support custom attributes, so we only need to capture tokens during macro_rules! argument parsing.
commit sha 11efd75aeb8637bd5444104a57f1051b86c0d62b
Fix false negative in `option_as_ref_deref`
commit sha c2799c861d351f79702c02c0ecb4fae0773df548
Merge remote-tracking branch 'upstream/master' into sync-from-rust
commit sha 146e352db4eade947f6f358cd38c308e95783d7b
run cargo dev fmt
commit sha 1a26dbff22adaa80f967db15960766794cafff0e
Auto merge of #5938 - ebroto:sync-from-rust, r=ebroto Rustup r? @ghost changelog: none
commit sha aa3b04ff747db336a10945aa90caa361ca552a7f
Auto merge of #5933 - mikerite:fix-5927, r=matthiaskrgr Fix false negative in `option_as_ref_deref` Closes #5927 changelog: Fix false negative in `option_as_ref_deref`
push time in 2 months
PR opened rust-lang/rust-clippy
Closes #5927
changelog: Fix false negative in option_as_ref_deref
pr created time in 2 months
push eventmikerite/rust-clippy
commit sha 62db617e401487f7b4b5d2d19591b16c7339d131
Avoid storing `SymbolStr` in a struct. It's intended only for very temporary use.
commit sha 70a41a92815a79c88dd9a2e8aa02503a3b95eae8
Enable detecting multiple-argument panics
commit sha 07867fde592babd74ee9934726c4c7010dee149b
Clean up dogfood fallout
commit sha 57678c8315e339308fb0d1b205aaa413cd120e15
Auto merge of #5811 - JarredAllen:panic_multiple_args, r=phansch Panic multiple args changelog: Fixes bug with `panic` lint reported in #5767. I also did the same changes to the lints for `todo`, `unimplemented` and `unreachable`, so those lints should now also detect calls to those macros with a message.
commit sha 5a20489c5ca0951827cbb1b4d72ddfdfd393713a
Rename TypeckTables to TypeckResults.
commit sha e5105e82d31b254a81f38fbf38a8043ba41bee3a
Fix typo
commit sha 1367f25fbf3e152aac66c88616258500b69b030f
Auto merge of #5814 - giraffate:fix_typo, r=flip1995 Fix typo changelog: none
commit sha 7c5d4a41459abeb40eea734efaf08657602815cb
Add test for correct behavior
commit sha e85b590936863e88da4ccd73af9f5da0787b9609
Fix bug in lint
commit sha 3d3a13d8719893972e2146cde86672151e7d5476
Fix sync fallout (fmt)
commit sha 9a945c741375740d89c3c2029f3a46adeb7e510f
Auto merge of #5817 - flip1995:rustup, r=flip1995 Rustup r? @ghost Preparation for emergency Clippyup to fix an ICE #5816 changelog: none
commit sha 0f501ac1db5152fac4712e0357fc498aed6f7313
Merge remote-tracking branch 'upstream/master' into rustup
commit sha 799eef691969c2f6ecf33359f0b1e1691a060648
Auto merge of #5818 - flip1995:rustup, r=flip1995 Rename TypeckTables to TypeckResults. r? @ghost changelog: none
commit sha 8cf4219c1673533eb5caf304237bffaa8e847067
Auto merge of #5815 - JarredAllen:redundant_pattern_bugfix, r=flip1995 Redundant pattern bugfix changelog: Fixes the bug reported #5766
commit sha 442c8ae23b90874485468b3becfc011f8c9d40bb
Fix FP for `suspicious_arithmetic_impl` from `suspicious_trait_impl` lint
commit sha c720d823e1e633cccfd24e1df76cc04a628e83b0
redundant_closure_call - don't lint when used more than once
commit sha 0fecaf1abcbe8d4ba1a9c532b69aab6fab3097c8
redundant_closure_call - extract lint from misc_early.rs, adapt to LatePass
commit sha 9603d9652b9d172842c77f566121437768bc962f
redundant_closure_call - add support for shadowed closures
commit sha 1ac8b85c9fd38ff0a14061cae0b4d31e9bfafd56
redundant_closure_call - pr review
commit sha 942e0e6facd0944843441a4b8e004902487b6cb7
Auto merge of #5800 - montrivo:bugfix/redundant_closure, r=matthiaskrgr redundant_closure_call - don't lint when used more than once Fixes #3354. changelog: fix redundant_closure_call false positive when closure called more than once
push time in 2 months
PR opened rust-lang/rust-clippy
Extend the lint to handle chains of methods combined with unary negation.
Closes #5924
changelog: Fix false positive in PRECEDENCE lint
pr created time in 2 months
issue commentrust-lang/rust-clippy
I actually think map_or looks the best. I like that it's compact and the default is close to the mapping function. Let's see what others think.
I saw that lint, but even specifying
-D clippy::pedanticI couldn't get it to trigger on my code example. I presumed it had an exception for booleans.
It works for me. Playground
comment created time in 2 months
pull request commentrust-lang/rust-clippy
Move away form blacklist terminology
It's got to be done without breaking peoples config/code. The warnings should be emitted if the old name is used with instructions for using the new name. Don't crash with an error. #3803 shows how this can be done.
comment created time in 2 months
issue commentrust-lang/rust-clippy
This seems like it belongs in pedantic to me.
I prefer both to comparison with Some(true) which I see every now and then.
if https_proxy.map(|v| v.starts_with("https://")) == Some(true) {
//...
}
Also Clippy will ask you to use map_or in the first example.
comment created time in 2 months