Commit graph

13 commits

Author SHA1 Message Date
Oliver Scherer
b8654eaa6c Stabilize tool lints 2018-10-11 12:16:22 +02:00
Ryan Cumming
9bd4e5469e Don't suggest cloned() for map Box deref
Boxes are a bit magic in that they need to use `*` to get an owned value
out of the box. They implement `Deref` but that only returns a
reference. This means an easy way to convert an `Option<Box<T>>` to an
`<Option<T>` is:

```
box_option.map(|b| *b)
```

However, since b36bb0a6 the `map_clone` lint is detecting this as an
attempt to copy the box. Fix by excluding boxes completely from the
deref part of this lint.

Fixes #3274
2018-10-08 06:20:32 +11:00
Manish Goregaokar
e9c025ea70 Add license header to Rust files 2018-10-06 09:43:08 -07:00
Oliver Schneider
b36bb0a68d Reimplement the map_clone lint from scratch 2018-10-02 15:13:43 +02:00
Manish Goregaokar
057243f16b relicensing: Remove map_clone
This removes the code added in https://github.com/rust-lang-nursery/rust-clippy/pull/427
2018-10-02 12:51:38 +02:00
flip1995
1b6f6051a8 Adapt ui-tests to the tool_lints 2018-08-29 11:08:29 -07: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
Oliver Schneider
fb6895836f Address PR comments 2017-05-11 15:36:27 +02:00
Oliver Schneider
2cd3366817 Fixes #443 2017-05-10 13:42:19 +02:00
Oliver Schneider
1f2c97a291 remove all //~ from tests 2017-02-08 14:58:07 +01:00
Oliver Schneider
fd1351f6e3 rustup and compile-fail -> ui test move 2017-02-07 21:05:30 +01:00
Renamed from tests/compile-fail/map_clone.rs (Browse further)