Commit Graph

91 Commits

Author SHA1 Message Date
Michael Wright
a6aa0acbea Fix dogfood errors 2020-12-13 06:32:41 +02:00
Cameron Steffen
fff5fa6581 Eat collapsible_match dogfood 2020-11-29 15:34:11 -06:00
PunitLodha
2345ef5b1f added lints str_to_string and string_to_string 2020-11-25 20:59:29 +05:30
bors
92ba07582e Auto merge of #6134 - patrickelectric:as_utf8, r=llogiq
Check when `from_utf8` is called from sliced byte array from string

---

*Please keep the line below*
changelog: Fix #5487: Add linter to check when `from_utf8` is called from sliced byte array from string.
2020-11-07 17:06:27 +00:00
Patrick José Pereira
bc27d1492d Add string_from_utf8_as_bytes linter
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-11-04 21:17:46 -03:00
Cameron Steffen
22cc77a232 Use const rustc sym where possible 2020-11-02 11:46:37 -06:00
David Tolnay
c81bea45f4
Make clippy_lints's doc tests succeed 2020-10-08 04:54:17 -07:00
David Tolnay
3a6f59ecae
Document string_lit_as_bytes known problems 2020-10-08 04:50:24 -07:00
David Tolnay
a5ef305cb5
Downgrade string_lit_as_bytes to nursery 2020-10-06 19:41:22 -07:00
rail
ce06472246 replace walk_ptrs_ty with peel_refs 2020-09-17 10:11:59 +12:00
Ujjwal Sharma
ae0eb390b0 rust_ast::ast => rustc_ast 2020-08-17 20:32:32 +00:00
Valentin Lazureanu
5a20489c5c Rename TypeckTables to TypeckResults. 2020-07-17 08:47:04 +00:00
Eduard-Mihai Burtescu
30c046ede4 Use 'tcx for references to AccessLevels wherever possible. 2020-07-03 00:04:48 +03:00
Eduard-Mihai Burtescu
f5ce0e5fe9 rustc_lint: only query typeck_tables_of when a lint needs it. 2020-06-26 02:56:23 +03:00
Aaron Hill
6b3ee8f600 Update Clippy for MethodCall changes 2020-06-10 17:30:11 -04:00
Lzu Tao
8db24840f7 Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippy 2020-06-09 14:36:01 +00:00
Philipp Hansch
0480ff861a
More diagnostic items
In particular for:

* `VecDeque`
* `String`
* `Mutex`
* `HashMap`
* `HashSet`

cc https://github.com/rust-lang/rust/pull/71414 https://github.com/rust-lang/rust-clippy/issues/5393
2020-04-26 13:44:08 +02:00
Matthias Krüger
aff57e0f43 rustup https://github.com/rust-lang/rust/pull/70536 2020-03-30 11:17:58 +02:00
Yuki Okushi
4253aa7137 Rustup to rust-lang/rust#69592 2020-03-01 12:23:33 +09:00
flip1995
8472ecda0f
Fix fallout 2020-02-21 11:14:18 +01:00
Yuki Okushi
ce1c6b285d Rustup to rust-lang/rust#68045 2020-01-13 21:55:57 +09:00
Yuki Okushi
39947992b5 Rustup to rust-lang/rust#67806 2020-01-11 21:50:00 +09:00
Yuki Okushi
2f2eaf8b7e Rustup to rust-lang/rust#67886 2020-01-07 01:46:33 +09:00
Philipp Hansch
c5178e82b4
Rustup to https://github.com/rust-lang/rust/pull/67853
Specifically caused by https://github.com/rust-lang/rust/pull/67786
2020-01-04 11:30:03 +01:00
Yuki Okushi
e2636729ec Rustup to rust-lang/rust#66936 2019-12-27 16:13:53 +09:00
Lzu Tao
652666b288 rustup "Add span information to ExprKind::Assign" 2019-12-24 11:25:24 +07:00
daxpedda
946961d19e
Change to only detect in external macros. 2019-12-05 11:06:13 +01:00
daxpedda
d11b958faf
Fix false positive in string_add. 2019-12-04 21:51:02 +01:00
Matthias Krüger
98e433d70d
Rustup to rust-lang/rust#66878 2019-12-04 01:34:01 +01:00
Andy Russell
d33ad45d7d
trigger string_lit_as_bytes when literal has escapes 2019-11-26 17:07:17 -05:00
lzutao
d229d91d88
use usize::from
Co-Authored-By: Mateusz Mikuła <mati865@users.noreply.github.com>
2019-11-19 23:47:18 +07:00
Lzu Tao
4da0da9281 use more efficient code to generate repeated string
see https://rust.godbolt.org/z/z9vrFP for comparison
2019-11-19 23:08:50 +07:00
flip1995
4bbd10a585
Rustup to rust-lang/rust#64813 2019-09-27 17:21:20 +02:00
KRAAI, MATTHEW [VISUS]
204b2f3658 Remove in_macro_or_desugar 2019-08-19 09:30:32 -07:00
Philipp Hansch
b608e02e1c
Doctests: Enable running doc tests for restriction lints 2019-08-03 21:24:50 +02:00
Thiago Arrais
7d1a9447ea Extract semantic constant 2019-07-08 17:51:13 -03:00
Jens Hausdorf
6d1aaac6c3 Avoid reporting string_lit_as_bytes for long strings
Port of @jens1o code ([b76f939][jens1o_commit])

Fixes #1208

[jens1o_commit]: b76f939ac2

Co-authored-by: Thiago Arrais <thiago.arrais@gmail.com>
2019-07-08 13:13:01 -03:00
Oliver Scherer
f7f85a0dca Prevent symbocalypse 2019-05-17 23:53:54 +02:00
Oliver Scherer
dfbc74b08b Rustfmt all the things 2019-05-14 10:33:48 +02:00
Oliver Scherer
b2dbda4d48 Use symbols instead of strings 2019-05-14 10:33:42 +02:00
Manish Goregaokar
7eb8018554 Rename in_macro to in_macro_or_desugar 2019-05-11 21:39:02 -07:00
Matthew Kraai
753c39672e Use lint pass macros
Fixes #3917.
2019-04-17 09:35:22 -07:00
Alexander Regueiro
d43966a176 Various cosmetic improvements. 2019-03-10 18:06:28 +00:00
Andy Russell
fe96ffeac9
move lint documentation into macro invocations 2019-03-05 18:45:08 -05:00
ljedrz
8dac8a6ba4 HirIdify some lints 2019-02-24 20:49:43 +01:00
Matthias Krüger
e9e0a7e3bd rustup https://github.com/rust-lang/rust/pull/57726 2019-01-27 01:42:34 +01:00
Philipp Hansch
38d4ac7cea
Remove all copyright license headers
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2019-01-08 21:46:39 +01:00
Konrad Borowski
3f62fc3a7e Remove crate:: prefixes from crate paths
This is somewhat misleading, as those are actually external crates,
and don't need a crate:: prefix.
2018-12-29 16:05:49 +01:00
flip1995
4e74eef6e9
Add applicability level to (nearly) every span_lint_and_sugg function 2018-11-27 15:29:23 +01:00
flip1995
9096269610
Add Applicability::Unspecified to span_lint_and_sugg functions 2018-11-27 15:29:23 +01:00