Ryan Cumming
58459abd0c
Allow pass by reference if we return a reference
...
Currently this code will trigger `trivally_copy_pass_by_ref`:
```
struct OuterStruct {
field: [u8; 8],
}
fn return_inner(outer: &OuterStruct) -> &[u8] {
&outer.field
}
```
If we change the `outer` to be pass-by-value it will not live long
enough for us to return the reference. The above example is trivial but
I've hit this in real code that either returns a reference to either the
argument or in to `self`.
This suppresses the `trivally_copy_pass_by_ref` lint if we return a
reference and it has the same lifetime as the argument. This will likely
miss complex cases with multiple lifetimes bounded by each other but it
should cover the majority of cases with little effort.
2018-07-23 18:44:40 +10:00
Manish Goregaokar
1f65617372
Merge branch 'macro-use' into HEAD
2018-07-20 00:52:01 -07:00
Manish Goregaokar
77b0300a55
Merge branch 'pr-2939' into HEAD
2018-07-20 00:51:57 -07:00
Manish Goregaokar
2a37a62686
Update dependencies
2018-07-20 00:50:02 -07:00
Manish Goregaokar
3c2b54870e
Remove warning
2018-07-20 00:50:02 -07:00
Manish Goregaokar
5918a3fc1e
Remove import of if_chain
2018-07-20 00:50:02 -07:00
Alexander Regueiro
4d2c838a32
Update to nightly
2018-07-20 03:59:07 +01:00
Philipp Krones
0f49e8968d
Merge pull request #2936 from flip1995/useless_lint_attr
...
Fix useless_attribute lint for extern crate items with macro_use
2018-07-19 14:57:28 +02:00
Philipp Krones
7877730115
Merge pull request #2938 from flip1995/travis
...
Remove duplication of the cargo and rls repos from travis
2018-07-19 14:36:30 +02:00
flip1995
988b552337
Remove duplication of the cargo and rls repos from travis
2018-07-19 14:14:12 +02:00
flip1995
ac77a26b8a
Skip useless_attribute lint on allow(unused_imports) on extern crate items with macro_use
2018-07-19 13:59:25 +02:00
Manish Goregaokar
c7676356b8
Remove import of matches
2018-07-19 01:06:02 -07:00
Manish Goregaokar
5d74e2096b
Remove import of rustc
2018-07-19 00:53:23 -07:00
Manish Goregaokar
00ba67a12b
Remove import of lazy_static
2018-07-19 00:11:15 -07:00
Manish Goregaokar
c1745cde82
Remove import of serde
2018-07-19 00:02:08 -07:00
Manish Goregaokar
de13d5a5bd
Merge pull request #2934 from pickfire/patch-1
...
Improve website panel heading experience
2018-07-18 23:50:37 -07:00
Ivan Tham
2c65e7c835
Improve website panel heading experience
2018-07-19 14:12:47 +08:00
Manish Goregaokar
c05adc545c
Temporarily allow macro_use_extern_crate
2018-07-18 20:24:37 -07:00
Manish Goregaokar
f27aaacb9b
Merge pull request #2923 from rust-lang-nursery/kind
...
Rustup to 1ecf6929dc3b309cdfcb7239260777dab38242b9
2018-07-16 16:41:50 -07:00
Manish Goregaokar
3246a1f5c0
Update mini-macro post proc macro stabilization
...
https://github.com/rust-lang/rust/pull/52081 stabilized proc macros, but
quote is still unstable, so you need to explicitly enable that feature.
2018-07-16 16:29:16 -07:00
Manish Goregaokar
196ffa8ad8
Merge pull request #2922 from rust-lang-nursery/rm-clip
...
Fix travis build by removing cargo-clippy
2018-07-16 15:32:19 -07:00
Manish Goregaokar
e58eb520a4
Fix travis build by removing cargo-clippy
2018-07-16 14:14:37 -07:00
Manish Goregaokar
a43f8cf819
some readme clarifications
2018-07-16 13:39:38 -07:00
Manish Goregaokar
e22928c23c
Merge pull request #2921 from yaahallo/master
...
Update readme for new clippy install method
2018-07-16 13:38:09 -07:00
Jane Lusby
29cae6263b
Update readme for new clippy install method
2018-07-16 13:30:16 -07:00
Oliver Schneider
8f61a792f4
Update test output to changes in rustc
2018-07-16 15:43:30 +02:00
Oliver Schneider
6992937002
Update for hir renamings in rustc
2018-07-16 15:07:39 +02:00
csmoe
8e929946fd
DeclKind
2018-07-16 11:48:33 +02:00
csmoe
8cf463fe93
StmtKind
2018-07-16 11:48:33 +02:00
csmoe
12ded030b6
TyKind
2018-07-16 11:48:33 +02:00
csmoe
5d4102ee78
BinOpKind
2018-07-16 11:46:37 +02:00
csmoe
1bd17e4fa2
ExprKind
2018-07-16 11:46:37 +02:00
Oliver Schneider
2a016890a0
Merge pull request #2920 from rust-lang-nursery/rustup
...
Rustup
2018-07-16 10:20:29 +02:00
Oliver Schneider
5e085e4310
Remove use of ty_to_def_id
2018-07-15 02:04:23 +02:00
Oliver Schneider
1e9f076254
Ignore spans when comparing expressions
2018-07-15 00:00:27 +02:00
Oliver Schneider
06d6710147
Merge pull request #2911 from phansch/add_toolchain_file
...
Add rust-toolchain file
2018-07-11 10:28:15 +02:00
Philipp Hansch
40151d91af
Add rust-toolchain file
...
Using `nightly` means that the latest available nightly version will be
used when cd'ing to a clippy checkout.
2018-07-11 08:03:46 +02:00
Philipp Krones
aeb653f110
Merge pull request #2902 from mikerite/missing_inline_refactor
...
Remove duplication in missing_inline
2018-07-09 19:46:17 +02:00
Michael Wright
60af4a8e13
Remove duplication in missing_inline
2018-07-08 08:06:24 +02:00
Manish Goregaokar
d914106d87
Bump to 0.0.212
2018-07-06 23:23:19 -07:00
Manish Goregaokar
184b99de39
Merge branch 'pr-2889'
2018-07-06 23:20:01 -07:00
Philipp Hansch
5e92e7afb4
Merge pull request #2898 from dwijnand/Clippy
...
Consistently call it "Clippy", not clippy or rust-clippy
2018-07-06 09:11:18 +01:00
Oliver Schneider
aad450ef92
Merge pull request #2899 from nrc/rustup
...
Add some more winapi features
2018-07-06 01:20:17 +02:00
Nick Cameron
6d9d3bac1d
Add some more winapi features
2018-07-06 11:16:36 +12:00
Oliver Schneider
28daee4c91
Rustup
2018-07-05 13:41:51 +02:00
Dale Wijnand
d95d6516b4
Consistently call it "Clippy", not clippy or rust-clippy
...
As per discussion on the Clippy 1.0 RFC
2018-07-05 11:37:50 +01:00
Oliver Schneider
6c70013f93
Merge pull request #2895 from gnzlbg/lint_no_inline
...
Add missing_inline lint
2018-07-05 07:54:22 +02:00
gnzlbg
3fec3b47b6
refactor function
2018-07-05 01:53:40 +02:00
gnzlbg
14cbdf2607
do not apply lint to executable crate type
2018-07-04 16:39:52 +02:00
gnzlbg
999a00bf5e
address reviews
2018-07-04 15:32:55 +02:00