Commit graph

18 commits

Author SHA1 Message Date
Mateusz Mikuła
8ed8ee895a Update to nightly 2018-05-28 2018-05-29 10:56:58 +02:00
Michael Wright
fca248957b Merge branch 'master' into option_option_pr 2018-01-19 07:56:46 +02:00
Oliver Schneider
8217e33718
Only suggest implementing Copy if it can actually be done 2018-01-18 14:27:47 +01:00
Manish Goregaokar
552e950080 needless_pass_by_value: Whitelist RangeArgument (fixes #2357) 2018-01-18 14:30:53 +05:30
Manish Goregaokar
cf1fbaa36a needless_pass_by_value: Ignore for extern funcs (fixes #1844) 2018-01-18 14:30:32 +05:30
Michael Wright
6737bae9b1 Implemented option_option lint 2017-12-26 09:24:12 +02:00
sinkuu
6fb736bd42 Fix false positive in needless_pass_by_value trait methods 2017-11-07 06:33:49 +09:00
sinkuu
d88cc5376e Add test to take Self as an argument 2017-11-03 17:56:26 +09:00
sinkuu
cad33c0306 Extend needless_pass_by_value to methods 2017-11-03 17:36:38 +09:00
sinkuu
2be6245179 Duplicate ptr_arg's suggestion logic 2017-10-08 17:51:44 +09:00
sinkuu
bf97cd0338 Reduce false-positives for needless_pass_by_value lint
Excluding a type whose reference also fulfills the trait bound.
2017-10-08 17:25:56 +09:00
Oliver Schneider
50ffaca4c9
Reduce the hackiness of cargo-clippy 2017-10-03 12:07:24 +02:00
Oliver Schneider
74c776585c Move all our tests back to ui tests 2017-08-01 17:54:21 +02:00
Oliver Schneider
4465bc3e3f Make most tests an example so we can run them one by one 2017-05-17 14:19:44 +02:00
sinkuu
3516d45d7c Use multispan_sugg 2017-02-21 18:44:31 +09:00
sinkuu
627d24c80f Fix suggestion for let <pat> 2017-02-21 00:27:12 +09:00
sinkuu
f1b0b774e7 Support non-moving usages at match
This `match` is not moving the `String`:

```rust
fn foo(x: Option<String>) -> i32 {
    match x {
        Some(_) => 1,
        None => 2,
    }
}
```

With this change, it will be linted and suggested to add `*` to deref it.

```rust
fn foo(x: &Option<String>) -> i32 {
    match *x {
        Some(_) => 1,
        None => 2,
    }
}
```
2017-02-20 16:45:37 +09:00
sinkuu
0a6bc6031a Rename lint to needless_take_by_value
And fixes false-positives for generics and `match`
2017-02-20 16:02:48 +09:00
Renamed from tests/ui/needless_take_by_value.rs (Browse further)