]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoimprove cc of function
Oliver Schneider [Thu, 3 Dec 2015 11:43:50 +0000 (12:43 +0100)]
improve cc of function

8 years agohigh-speed-dogfood
Oliver Schneider [Wed, 18 Nov 2015 16:09:48 +0000 (17:09 +0100)]
high-speed-dogfood

8 years agocompute cyclomatic complexity (adjusted to not punish Rust's `match`)
Oliver Schneider [Wed, 18 Nov 2015 11:35:18 +0000 (12:35 +0100)]
compute cyclomatic complexity (adjusted to not punish Rust's `match`)

8 years agobump 27
Manish Goregaokar [Mon, 30 Nov 2015 17:47:14 +0000 (23:17 +0530)]
bump 27

8 years agoRust upgrade to rustc 1.6.0-nightly (52d95e644 2015-11-30)
Manish Goregaokar [Mon, 30 Nov 2015 17:46:28 +0000 (23:16 +0530)]
Rust upgrade to rustc 1.6.0-nightly (52d95e644 2015-11-30)

8 years agoBump to 26
Manish Goregaokar [Mon, 30 Nov 2015 10:22:17 +0000 (15:52 +0530)]
Bump to 26

8 years agoMerge branch 'pr-474'
Manish Goregaokar [Mon, 30 Nov 2015 10:21:59 +0000 (15:51 +0530)]
Merge branch 'pr-474'

8 years agofix for latest nightly
Hobofan [Fri, 27 Nov 2015 13:47:00 +0000 (14:47 +0100)]
fix for latest nightly
Fixes breakage introduced by rust-lang/rust#30043

8 years agoMerge pull request #468 from devonhollowood/option-methods
Manish Goregaokar [Thu, 26 Nov 2015 08:52:27 +0000 (14:22 +0530)]
Merge pull request #468 from devonhollowood/option-methods

Lint `map(f).unwrap_or(a)` and `map(f).unwrap_or_else(g)`

8 years agoAdd lints suggesting map_or() and map_or_else()
Devon Hollowood [Mon, 23 Nov 2015 05:48:19 +0000 (21:48 -0800)]
Add lints suggesting map_or() and map_or_else()

In accordance with the latter lint, replace map().unwrap_or_else() in
src/mut_mut.rs with map_or_else()

8 years agoMerge pull request #473 from fhartwig/loop-index-false-positive
Manish Goregaokar [Thu, 26 Nov 2015 05:46:46 +0000 (11:16 +0530)]
Merge pull request #473 from fhartwig/loop-index-false-positive

Suppress explicit_counter_loop lint if loop variable is used after the loop

8 years agoPublish 0.0.25
Manish Goregaokar [Wed, 25 Nov 2015 23:27:23 +0000 (04:57 +0530)]
Publish 0.0.25

8 years agoSuppress explicit_counter_loop lint if loop variable is used after the loop
Florian Hartwig [Wed, 25 Nov 2015 23:09:01 +0000 (00:09 +0100)]
Suppress explicit_counter_loop lint if loop variable is used after the loop

8 years agoMerge pull request #472 from fhartwig/more-rustup
Manish Goregaokar [Wed, 25 Nov 2015 15:42:10 +0000 (21:12 +0530)]
Merge pull request #472 from fhartwig/more-rustup

Fixes to build with current rust nightly

8 years agoFixes to build with current rust nightly
Florian Hartwig [Wed, 25 Nov 2015 15:28:29 +0000 (16:28 +0100)]
Fixes to build with current rust nightly

8 years agoMerge pull request #470 from sanxiyn/match-ref-pats
Manish Goregaokar [Wed, 25 Nov 2015 05:07:09 +0000 (10:37 +0530)]
Merge pull request #470 from sanxiyn/match-ref-pats

Extend match_ref_pats to desugared matches

8 years agoDon't panic
Seo Sanghyeon [Wed, 25 Nov 2015 04:57:50 +0000 (13:57 +0900)]
Don't panic

8 years agoExtend match_ref_pats to desugared matches
Seo Sanghyeon [Tue, 24 Nov 2015 17:47:17 +0000 (02:47 +0900)]
Extend match_ref_pats to desugared matches

8 years agoDogfood match_ref_pats for `if let`
Seo Sanghyeon [Tue, 24 Nov 2015 17:44:40 +0000 (02:44 +0900)]
Dogfood match_ref_pats for `if let`

8 years agospurious newline
Manish Goregaokar [Mon, 23 Nov 2015 11:04:23 +0000 (16:34 +0530)]
spurious newline

8 years agoMerge branch 'pr-462'
Manish Goregaokar [Sun, 22 Nov 2015 16:28:13 +0000 (21:58 +0530)]
Merge branch 'pr-462'

Conflicts:
README.md

8 years agoAdd block_in_if lint, #434
John Quigley [Fri, 20 Nov 2015 05:22:52 +0000 (00:22 -0500)]
Add block_in_if lint, #434

8 years agoCrates bump
Manish Goregaokar [Fri, 20 Nov 2015 10:51:14 +0000 (16:21 +0530)]
Crates bump

8 years agoAppease clippy by not shadowing variables
Florian Hartwig [Thu, 19 Nov 2015 19:19:19 +0000 (20:19 +0100)]
Appease clippy by not shadowing variables

8 years agoSimplify has_debug_impl
Florian Hartwig [Thu, 19 Nov 2015 19:13:36 +0000 (20:13 +0100)]
Simplify has_debug_impl

8 years agoRun update_lints
Florian Hartwig [Thu, 19 Nov 2015 13:40:51 +0000 (14:40 +0100)]
Run update_lints

8 years agowarn on use of ok().expect()
Florian Hartwig [Thu, 19 Nov 2015 13:39:27 +0000 (14:39 +0100)]
warn on use of ok().expect()

8 years agoMerge pull request #463 from fhartwig/rustup
Manish Goregaokar [Thu, 19 Nov 2015 15:01:20 +0000 (20:31 +0530)]
Merge pull request #463 from fhartwig/rustup

Update to latest rust nightly

8 years agoUpdate to latest rust nightly
Florian Hartwig [Thu, 19 Nov 2015 14:51:30 +0000 (15:51 +0100)]
Update to latest rust nightly

8 years agoMerge pull request #458 from sanxiyn/rustfmt
Manish Goregaokar [Tue, 17 Nov 2015 05:37:15 +0000 (11:07 +0530)]
Merge pull request #458 from sanxiyn/rustfmt

rustfmt a little

8 years agorustfmt a little
Seo Sanghyeon [Tue, 17 Nov 2015 05:22:57 +0000 (14:22 +0900)]
rustfmt a little

8 years agoMerge pull request #457 from sanxiyn/match-block-comma
Manish Goregaokar [Tue, 17 Nov 2015 04:57:07 +0000 (10:27 +0530)]
Merge pull request #457 from sanxiyn/match-block-comma

Remove trailing commas in match arms with blocks

8 years agoRemove trailing commas in match arms with blocks
Seo Sanghyeon [Tue, 17 Nov 2015 04:39:42 +0000 (13:39 +0900)]
Remove trailing commas in match arms with blocks

8 years agoMerge pull request #452 from fhartwig/lifetime-false-positives
llogiq [Sat, 14 Nov 2015 08:25:19 +0000 (09:25 +0100)]
Merge pull request #452 from fhartwig/lifetime-false-positives

Fix some false positive in needless_lifetimes lint

8 years agoMerge pull request #454 from apasel422/issue-446
Manish Goregaokar [Wed, 11 Nov 2015 16:18:33 +0000 (21:48 +0530)]
Merge pull request #454 from apasel422/issue-446

Match `min` and `max` functions using `DefId`

8 years agoMatch `min` and `max` functions using `DefId`
Andrew Paseltiner [Wed, 11 Nov 2015 16:08:33 +0000 (11:08 -0500)]
Match `min` and `max` functions using `DefId`

Closes #446.

8 years agoMerge pull request #453 from apasel422/transmute
Manish Goregaokar [Wed, 11 Nov 2015 15:56:14 +0000 (21:26 +0530)]
Merge pull request #453 from apasel422/transmute

Add lint for useless transmutes

8 years agoAdd lint for useless transmutes
Andrew Paseltiner [Wed, 11 Nov 2015 14:28:31 +0000 (09:28 -0500)]
Add lint for useless transmutes

Closes #441.

8 years agoAdd some tests for lifetime elision lint with types and traits with lifetimes
Florian Hartwig [Tue, 10 Nov 2015 23:26:22 +0000 (00:26 +0100)]
Add some tests for lifetime elision lint with types and traits with lifetimes

8 years agoTrack elided lifetimes in types and trait objects
Florian Hartwig [Tue, 10 Nov 2015 23:12:45 +0000 (00:12 +0100)]
Track elided lifetimes in types and trait objects

8 years agoMerge pull request #450 from Manishearth/mir_float_cmp
Manish Goregaokar [Tue, 10 Nov 2015 15:49:47 +0000 (21:19 +0530)]
Merge pull request #450 from Manishearth/mir_float_cmp

use rustc's eval_const, bail on (negative) infinity

8 years agouse rustc's eval_const, bail on (negative) infinity
Andre Bogus [Tue, 10 Nov 2015 10:19:33 +0000 (11:19 +0100)]
use rustc's eval_const, bail on (negative) infinity

8 years agoMerge pull request #449 from Manishearth/shadow_visitor
llogiq [Tue, 10 Nov 2015 09:39:28 +0000 (10:39 +0100)]
Merge pull request #449 from Manishearth/shadow_visitor

use visitor for contains_self

8 years agouse visitor for contains_self
Andre Bogus [Tue, 10 Nov 2015 09:25:21 +0000 (10:25 +0100)]
use visitor for contains_self

8 years agoMerge pull request #447 from apasel422/executable
llogiq [Mon, 9 Nov 2015 13:09:24 +0000 (14:09 +0100)]
Merge pull request #447 from apasel422/executable

Remove executable permission from remaining source files

8 years agoRemove executable permission from remaining source files
Andrew Paseltiner [Mon, 9 Nov 2015 13:04:41 +0000 (08:04 -0500)]
Remove executable permission from remaining source files

8 years agoMerge branch 'pr-445'
Manish Goregaokar [Mon, 9 Nov 2015 06:46:03 +0000 (12:16 +0530)]
Merge branch 'pr-445'

8 years agoupdate readme to specify both lint groups are needed for the whole set
Emanuel Czirai [Mon, 9 Nov 2015 05:49:44 +0000 (06:49 +0100)]
update readme to specify both lint groups are needed for the  whole set

As a new user and newbie to rust, after reading this part of the readme("whole set"), I thought I was seeing a bug when I used `#![deny(clippy)]` but also had to add `#![deny(shadow_unrelated)]`.
But this explained it: https://github.com/Manishearth/rust-clippy/blob/3322ffa8a048ef5369d3cdd914869fdf383473a4/src/lib.rs#L108

8 years agoTests shouldn't be executable (fixes #444)
Manish Goregaokar [Mon, 9 Nov 2015 03:19:20 +0000 (08:49 +0530)]
Tests shouldn't be executable (fixes #444)

8 years agoMerge pull request #440 from Manishearth/map_clone
Manish Goregaokar [Sun, 8 Nov 2015 04:43:55 +0000 (10:13 +0530)]
Merge pull request #440 from Manishearth/map_clone

match .map(Clone::clone)

8 years agomatch .map(Clone::clone)
llogiq [Thu, 5 Nov 2015 16:11:41 +0000 (17:11 +0100)]
match .map(Clone::clone)

8 years agoRustup to rustc 1.6.0-nightly (effcd2965 2015-11-04)
Manish Goregaokar [Thu, 5 Nov 2015 02:50:28 +0000 (08:20 +0530)]
Rustup to rustc 1.6.0-nightly (effcd2965 2015-11-04)

fixes #437

8 years agoMerge pull request #435 from sanxiyn/temporary-assignment
llogiq [Wed, 4 Nov 2015 13:20:04 +0000 (14:20 +0100)]
Merge pull request #435 from sanxiyn/temporary-assignment

New lint for assignment to temporary

8 years agoNew lint for assignment to temporary
Seo Sanghyeon [Wed, 4 Nov 2015 09:55:14 +0000 (18:55 +0900)]
New lint for assignment to temporary

8 years agoMerge pull request #427 from wartman4404/master
llogiq [Wed, 4 Nov 2015 05:41:33 +0000 (06:41 +0100)]
Merge pull request #427 from wartman4404/master

Prefer `.cloned()` over `.map(|x| x.clone())`

8 years agocheck for Deref conversions
wartman4404 [Wed, 4 Nov 2015 03:11:40 +0000 (21:11 -0600)]
check for Deref conversions

8 years agoNew lint for using `.cloned()`
wartman4404 [Sat, 31 Oct 2015 04:58:37 +0000 (23:58 -0500)]
New lint for using `.cloned()`

8 years agoMerge pull request #432 from nweston/zip-with-range
llogiq [Tue, 3 Nov 2015 21:45:52 +0000 (22:45 +0100)]
Merge pull request #432 from nweston/zip-with-range

New lint for zip with array length instead of enumerate()

8 years agoNew lint for zip with array length instead of enumerate()
Nathan Weston [Tue, 3 Nov 2015 14:42:52 +0000 (09:42 -0500)]
New lint for zip with array length instead of enumerate()

Fixes #11.

8 years agoMerge pull request #426 from Manishearth/fix-ptr-arg
llogiq [Sat, 31 Oct 2015 01:07:20 +0000 (02:07 +0100)]
Merge pull request #426 from Manishearth/fix-ptr-arg

Fix ptr-arg false positive for trait impls

8 years agoFix ptr-arg false positive for trait impls
Manish Goregaokar [Fri, 30 Oct 2015 23:48:05 +0000 (05:18 +0530)]
Fix ptr-arg false positive for trait impls

Fixes #425

8 years agoMerge pull request #422 from sanxiyn/no-effect
llogiq [Thu, 29 Oct 2015 11:05:28 +0000 (12:05 +0100)]
Merge pull request #422 from sanxiyn/no-effect

New lint for statement with no effect

8 years agoNew lint for statement with no effect
Seo Sanghyeon [Wed, 28 Oct 2015 16:50:00 +0000 (01:50 +0900)]
New lint for statement with no effect

8 years agoMerge pull request #423 from wartman4404/master
Manish Goregaokar [Thu, 29 Oct 2015 03:32:56 +0000 (09:02 +0530)]
Merge pull request #423 from wartman4404/master

Duplicate warnings for match_bool / single_match #403

8 years agoDon't show single_match if match_bool also applies
wartman4404 [Thu, 29 Oct 2015 03:26:48 +0000 (22:26 -0500)]
Don't show single_match if match_bool also applies

8 years agoMerge pull request #396 from fhartwig/while-let-for
llogiq [Tue, 27 Oct 2015 17:33:58 +0000 (18:33 +0100)]
Merge pull request #396 from fhartwig/while-let-for

Suggest for loop instead of while-let when looping over iterators

8 years agoAllow needless_lifetime to pass dogfood.sh
Florian Hartwig [Tue, 27 Oct 2015 17:28:36 +0000 (18:28 +0100)]
Allow needless_lifetime to pass dogfood.sh

8 years agoFix false positives when iterator variable is used after the loop
Florian Hartwig [Mon, 26 Oct 2015 22:49:37 +0000 (23:49 +0100)]
Fix false positives when iterator variable is used after the loop

8 years agoFix error in README
Florian Hartwig [Fri, 23 Oct 2015 08:50:18 +0000 (10:50 +0200)]
Fix error in README

8 years agoFixes for code review comments
Florian Hartwig [Thu, 22 Oct 2015 21:16:58 +0000 (23:16 +0200)]
Fixes for code review comments

* remove weird infinite loops from compile-tests
* remove call to Option::unwrap
* in the lint message, show while-let loop rewritten as for loop

8 years agoDon't suggest using a for loop if the iterator is used in the loop body
Florian Hartwig [Mon, 19 Oct 2015 23:04:21 +0000 (01:04 +0200)]
Don't suggest using a for loop if the iterator is used in the loop body

Due to https://github.com/rust-lang/rust/issues/8372, we have to use while-let
in these cases.

8 years agoSuggest for loop instead of while-let when looping over iterators
Florian Hartwig [Fri, 16 Oct 2015 18:27:13 +0000 (20:27 +0200)]
Suggest for loop instead of while-let when looping over iterators

8 years agoMerge pull request #415 from birkenfeld/fix_409
Georg Brandl [Mon, 26 Oct 2015 07:07:24 +0000 (08:07 +0100)]
Merge pull request #415 from birkenfeld/fix_409

Fix reverse_range_loop not taking sign into account (fixes #409)

8 years agoFix reverse_range_loop not taking sign into account (fixes #409)
Georg Brandl [Mon, 26 Oct 2015 06:43:38 +0000 (07:43 +0100)]
Fix reverse_range_loop not taking sign into account (fixes #409)

Adds a Display impl for Constant, because that might come in handy
elsewhere as well.

8 years agofix
Manish Goregaokar [Sun, 25 Oct 2015 18:19:53 +0000 (23:49 +0530)]
fix

8 years agobump version, add optional dep info
Manish Goregaokar [Sun, 25 Oct 2015 18:13:27 +0000 (23:43 +0530)]
bump version, add optional dep info

8 years agoMerge pull request #413 from iKevinY/approx-const
llogiq [Sun, 25 Oct 2015 09:35:29 +0000 (10:35 +0100)]
Merge pull request #413 from iKevinY/approx-const

Compare float literals to stringified constants

8 years agoCompare float literals to stringified constants
Kevin Yap [Sat, 24 Oct 2015 04:30:57 +0000 (21:30 -0700)]
Compare float literals to stringified constants

- Convert constants to strings and compare directly with float literal.
- Return immediately after positive match for constant.
- Fix value of `my_log10_e` in `approx_const` tests.

8 years agoMerge pull request #408 from iKevinY/approx-const
Manish Goregaokar [Fri, 23 Oct 2015 12:08:10 +0000 (17:38 +0530)]
Merge pull request #408 from iKevinY/approx-const

Change implementation of approx_const lint

8 years agoChange implementation of approx_const lint
Kevin Yap [Thu, 22 Oct 2015 22:19:03 +0000 (15:19 -0700)]
Change implementation of approx_const lint

- Replace epsilon with lower and upper bounds for each constant.
- Warn on use of "3.14", and update tests accordingly.

8 years agoMerge pull request #405 from sanxiyn/needless-update
Manish Goregaokar [Thu, 22 Oct 2015 09:23:54 +0000 (14:53 +0530)]
Merge pull request #405 from sanxiyn/needless-update

New lint for struct update that has no effect

8 years agoNew lint for struct update that has no effect
Seo Sanghyeon [Wed, 21 Oct 2015 15:25:16 +0000 (00:25 +0900)]
New lint for struct update that has no effect

8 years agoMerge pull request #402 from Manishearth/match_bool_hints
Manish Goregaokar [Wed, 21 Oct 2015 06:34:00 +0000 (12:04 +0530)]
Merge pull request #402 from Manishearth/match_bool_hints

added code snippet help to match_bool

8 years agoadded code snippet help to match_bool
Andre Bogus [Wed, 21 Oct 2015 06:24:56 +0000 (08:24 +0200)]
added code snippet help to match_bool

8 years agoMerge pull request #401 from kvikas/match_bool
Manish Goregaokar [Tue, 20 Oct 2015 19:30:39 +0000 (01:00 +0530)]
Merge pull request #401 from kvikas/match_bool

Match on bool should be replaced with if..else block

8 years agoFixups from review comments
Vikas Kumar [Tue, 20 Oct 2015 18:26:54 +0000 (11:26 -0700)]
Fixups from review comments

1. Moved common check `in_external_macro` to the top of function from inside each
conditionals.
2. Inlined `is_bool_expr` call

8 years agoRan util/update_lints.py to auto gen doc and lib.rs
Vikas Kumar [Tue, 20 Oct 2015 17:25:37 +0000 (10:25 -0700)]
Ran util/update_lints.py to auto gen doc and lib.rs

8 years agoMatch on bool should be replaced with if..else block
Vikas Kumar [Tue, 20 Oct 2015 17:18:48 +0000 (10:18 -0700)]
Match on bool should be replaced with if..else block

1. Added another conditional in `check_expr` impl to lint if match expr
is a bool.
2. Test cases.

8 years agoMerge branch 'pr-394'
Manish Goregaokar [Sat, 17 Oct 2015 19:24:03 +0000 (00:54 +0530)]
Merge branch 'pr-394'

8 years agoCleanup as discussed in PR
Florian Gilcher [Sat, 17 Oct 2015 18:16:54 +0000 (20:16 +0200)]
Cleanup as discussed in PR

8 years agoMake is_from_for_desugar sound (rust/28973 got fixed)
Manish Goregaokar [Fri, 16 Oct 2015 23:03:05 +0000 (04:33 +0530)]
Make is_from_for_desugar sound (rust/28973 got fixed)

8 years agoRegnerate README.md
Florian Gilcher [Thu, 15 Oct 2015 10:53:21 +0000 (12:53 +0200)]
Regnerate README.md

8 years agoNew lint for needless use of nightly features
Florian Gilcher [Thu, 15 Oct 2015 09:13:01 +0000 (11:13 +0200)]
New lint for needless use of nightly features

8 years agobump again
Manish Goregaokar [Thu, 15 Oct 2015 14:26:27 +0000 (19:56 +0530)]
bump again

8 years agoFix type complexity lint
Manish Goregaokar [Thu, 15 Oct 2015 14:25:14 +0000 (19:55 +0530)]
Fix type complexity lint

8 years agoMerge pull request #395 from Manishearth/rustup
llogiq [Thu, 15 Oct 2015 14:24:04 +0000 (16:24 +0200)]
Merge pull request #395 from Manishearth/rustup

rustup

8 years agoMerge branch 'master' of https://github.com/Manishearth/rust-clippy into rustup
Andre Bogus [Thu, 15 Oct 2015 14:19:08 +0000 (16:19 +0200)]
Merge branch 'master' of https://github.com/Manishearth/rust-clippy into rustup

8 years agoworkaround for failing test
Andre Bogus [Thu, 15 Oct 2015 14:18:40 +0000 (16:18 +0200)]
workaround for failing test

8 years agobump crate version
Andre Bogus [Thu, 15 Oct 2015 14:04:19 +0000 (16:04 +0200)]
bump crate version

8 years agorustup
Andre Bogus [Thu, 15 Oct 2015 14:02:19 +0000 (16:02 +0200)]
rustup