]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoDon't dogfood twice
Seo Sanghyeon [Wed, 16 Dec 2015 14:13:01 +0000 (23:13 +0900)]
Don't dogfood twice

8 years agoMerge pull request #502 from Manishearth/contrib
Manish Goregaokar [Tue, 15 Dec 2015 00:06:42 +0000 (05:36 +0530)]
Merge pull request #502 from Manishearth/contrib

Add short section on lint docs

8 years agoAdd short section on lint docs
llogiq [Mon, 14 Dec 2015 21:23:33 +0000 (22:23 +0100)]
Add short section on lint docs

8 years agoadding missing doc comments
llogiq [Mon, 14 Dec 2015 21:16:56 +0000 (22:16 +0100)]
adding missing doc comments

8 years agofix boxed_local example
llogiq [Mon, 14 Dec 2015 20:17:11 +0000 (21:17 +0100)]
fix boxed_local example

8 years agoMerge pull request #501 from oli-obk/fix/seme
Manish Goregaokar [Mon, 14 Dec 2015 16:53:42 +0000 (22:23 +0530)]
Merge pull request #501 from oli-obk/fix/seme

fix cyclomatic complexity lint (fixes #491, fixes #478)

8 years agofix fallout from CC improvements
Oliver Schneider [Mon, 14 Dec 2015 13:30:09 +0000 (14:30 +0100)]
fix fallout from CC improvements

8 years agofix cc computation in the presence of diverging calls
Oliver Schneider [Mon, 14 Dec 2015 13:29:20 +0000 (14:29 +0100)]
fix cc computation in the presence of diverging calls

CFG treats diverging calls as its completely own path out of the function.
While this makes sense, it should also mean that a panic should increase the cyclomatic
complexity. Instead it decreases it.

Minimal example:

```rust
if a {
    b
} else {
    panic!("cake");
}
d
```

creates the following graph

```dot
digraph G {
  "if a" -> "b"
  "if a" -> "panic!(\"cake\")"
  "b" -> c
}
```

which has a CC of 1 (3 - 4 + 2). A CC of 1 means there is one path through the program.
Obviously that is wrong. There are two paths. One returning normally, and one panicking.

8 years agomore doc comments
llogiq [Mon, 14 Dec 2015 12:31:28 +0000 (13:31 +0100)]
more doc comments

8 years agoMerge pull request #500 from oli-obk/patch-1
Manish Goregaokar [Mon, 14 Dec 2015 12:21:25 +0000 (17:51 +0530)]
Merge pull request #500 from oli-obk/patch-1

compiletest_rs needs to be at least 0.0.11

8 years agocompiletest_rs needs to be at least 0.0.11
Oliver Schneider [Mon, 14 Dec 2015 10:28:22 +0000 (11:28 +0100)]
compiletest_rs needs to be at least 0.0.11

otherwise tests using `SUGGESTION` will fail (see `compile-fail/eta.rs`)

8 years agomore docs
llogiq [Mon, 14 Dec 2015 07:03:01 +0000 (08:03 +0100)]
more docs

8 years agoMerge branch 'more_wiki'
Manish Goregaokar [Sun, 13 Dec 2015 16:28:18 +0000 (21:58 +0530)]
Merge branch 'more_wiki'

8 years agoAdd wiki note for escape analysis
Manish Goregaokar [Sun, 13 Dec 2015 03:38:58 +0000 (09:08 +0530)]
Add wiki note for escape analysis

8 years agoMerge pull request #497 from cesarb/ringbuf
Manish Goregaokar [Sun, 13 Dec 2015 00:22:55 +0000 (19:22 -0500)]
Merge pull request #497 from cesarb/ringbuf

Mention VecDeque in linkedlist lint

8 years agoMention VecDeque in linkedlist lint
Cesar Eduardo Barros [Sat, 12 Dec 2015 22:05:06 +0000 (20:05 -0200)]
Mention VecDeque in linkedlist lint

I couldn't find anything named RingBuf in the standard library. Some
search revealed that it had been renamed to VecDeque before the first
stable Rust release.

8 years agoMerge pull request #492 from Manishearth/wiki
Manish Goregaokar [Fri, 11 Dec 2015 14:20:19 +0000 (09:20 -0500)]
Merge pull request #492 from Manishearth/wiki

added wiki comments + wiki-generating python script

8 years agoadded wiki comments + wiki-generating python script
llogiq [Fri, 11 Dec 2015 00:22:27 +0000 (01:22 +0100)]
added wiki comments + wiki-generating python script

8 years agoMerge pull request #490 from Manishearth/fx-lifetime-fp
llogiq [Thu, 10 Dec 2015 17:14:24 +0000 (18:14 +0100)]
Merge pull request #490 from Manishearth/fx-lifetime-fp

Check for unused lifetimes in bounds (fixes #489)

8 years agoCheck for unused lifetimes in bounds (fixes #489)
Manish Goregaokar [Thu, 10 Dec 2015 16:44:12 +0000 (11:44 -0500)]
Check for unused lifetimes in bounds (fixes #489)

8 years agoUpgrade rust to rustc 1.6.0-nightly (462ec0576 2015-12-09)
Manish Goregaokar [Wed, 9 Dec 2015 20:56:49 +0000 (15:56 -0500)]
Upgrade rust to rustc 1.6.0-nightly (462ec0576 2015-12-09)

8 years agoMerge pull request #485 from sanxiyn/suggestion
llogiq [Tue, 8 Dec 2015 22:18:25 +0000 (23:18 +0100)]
Merge pull request #485 from sanxiyn/suggestion

Use suggestion for redundant_closure

8 years agoAdd span_lint_and_then and use it
Seo Sanghyeon [Tue, 8 Dec 2015 16:28:35 +0000 (01:28 +0900)]
Add span_lint_and_then and use it

8 years agoUse suggestion for redundant_closure
Seo Sanghyeon [Tue, 8 Dec 2015 06:03:01 +0000 (15:03 +0900)]
Use suggestion for redundant_closure

8 years agoupdated lints
Andre Bogus [Tue, 8 Dec 2015 05:32:55 +0000 (06:32 +0100)]
updated lints

8 years agoMerge pull request #483 from Manishearth/bored
llogiq [Mon, 7 Dec 2015 20:47:10 +0000 (21:47 +0100)]
Merge pull request #483 from Manishearth/bored

Add lint for unused lifetimes (fixes #459)

8 years agoMerge branch 'pr-482'
Manish Goregaokar [Mon, 7 Dec 2015 12:23:52 +0000 (07:23 -0500)]
Merge branch 'pr-482'

8 years agoAdd check on redundant _ bindings in structs
Guillaume Gomez [Sun, 6 Dec 2015 02:21:34 +0000 (03:21 +0100)]
Add check on redundant _ bindings in structs

8 years agoAdd lint for unused lifetimes (fixes #459)
Manish Goregaokar [Sun, 6 Dec 2015 21:36:22 +0000 (03:06 +0530)]
Add lint for unused lifetimes (fixes #459)

8 years agoMerge pull request #481 from fhartwig/lifetime-with-alias
Manish Goregaokar [Sun, 6 Dec 2015 03:38:40 +0000 (09:08 +0530)]
Merge pull request #481 from fhartwig/lifetime-with-alias

Make unneeded_lifetimes lint work properly with type aliases

8 years agoRemove obsolete workaround
Florian Hartwig [Sun, 6 Dec 2015 01:05:32 +0000 (02:05 +0100)]
Remove obsolete workaround

8 years agoMake lifetimes lint work with type aliases and non-locally-defined structs
Florian Hartwig [Fri, 4 Dec 2015 14:56:25 +0000 (15:56 +0100)]
Make lifetimes lint work with type aliases and non-locally-defined structs

8 years agoMerge pull request #480 from mrmonday/nightly-fixes
Manish Goregaokar [Sat, 5 Dec 2015 13:24:42 +0000 (18:54 +0530)]
Merge pull request #480 from mrmonday/nightly-fixes

Fix clippy with latest Rust nightly.

8 years agoFix clippy with latest Rust nightly.
Robert Clipsham [Sat, 5 Dec 2015 12:25:04 +0000 (12:25 +0000)]
Fix clippy with latest Rust nightly.

8 years agoMake panic in CC silencable (partial #478)
Manish Goregaokar [Sat, 5 Dec 2015 08:53:00 +0000 (14:23 +0530)]
Make panic in CC silencable (partial #478)

8 years agoMerge pull request #477 from Manishearth/escape
llogiq [Fri, 4 Dec 2015 18:29:13 +0000 (19:29 +0100)]
Merge pull request #477 from Manishearth/escape

Rudimentary escape analysis for Box<T>

8 years agoRudimentary escape analysis for Box<T>
Manish Goregaokar [Fri, 4 Dec 2015 10:12:53 +0000 (15:42 +0530)]
Rudimentary escape analysis for Box<T>

8 years agoMerge pull request #460 from oli-obk/cyclomatic_complexity
llogiq [Thu, 3 Dec 2015 15:52:53 +0000 (16:52 +0100)]
Merge pull request #460 from oli-obk/cyclomatic_complexity

Cyclomatic complexity

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 agoMerge pull request #475 from sanxiyn/unused-qualification
llogiq [Wed, 2 Dec 2015 14:38:19 +0000 (15:38 +0100)]
Merge pull request #475 from sanxiyn/unused-qualification

Remove unused qualifications

8 years agoRemove unused qualifications
Seo Sanghyeon [Fri, 27 Nov 2015 15:47:24 +0000 (00:47 +0900)]
Remove unused qualifications

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