flip1995
834ad76806
Remove code duplication
2019-04-18 12:04:46 +02:00
flip1995
40218bae0c
Format code
2019-04-18 11:50:45 +02:00
flip1995
be98df5ac3
Don't lint debug_assert!(false)
2019-04-18 11:47:39 +02:00
bors
b834dbb2d5
Auto merge of #3984 - phansch:bytecount_sugg, r=flip1995
...
Change naive_bytecount applicability to MaybeIncorrect
We can't use `MachineApplicable` here as applying the fix will cause
another error because `bytecount` would first have to be added to the
Cargo.toml.
Example:
```
error: You appear to be counting bytes the naive way
--> $DIR/bytecount.rs:5:13
|
LL | let _ = x.iter().filter(|&&a| a == 0).count(); // naive byte count
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider using the bytecount crate: `bytecount::count(x, 0)`
```
Just replacing it with the suggestion is not enough.
cc #3630
2019-04-18 07:49:09 +00:00
Philipp Hansch
01ea9bd9d8
Change naive_bytecount applicability MaybeIncorrect
...
We can't use `MachineApplicable` here as applying the fix will cause
another error because `bytecount` would first have to be added to the
Cargo.toml.
2019-04-17 20:46:42 +02:00
Matthew Kraai
753c39672e
Use lint pass macros
...
Fixes #3917 .
2019-04-17 09:35:22 -07:00
flip1995
ce87051779
Fix lint_without_lint_pass internal lint
2019-04-17 06:51:21 -07:00
flip1995
840eac2c05
Use {get,match}_def_path from LateContext
2019-04-17 12:53:29 +02:00
flip1995
2f100e04af
Remove uplifted functions {get,match}_def_path from Clippy
2019-04-17 12:51:57 +02:00
bors
27d62cf603
Auto merge of #3966 - flip1995:internal_lints, r=oli-obk
...
Enable rustc internal lints
Closes #3965
I'm not 100% sure if enabling the `-Zunstable-options` flag in the `.cargo/config` file is the right place.
2019-04-17 04:46:19 +00:00
bors
1132caabff
Auto merge of #3975 - phansch:has_placeholders, r=flip1995
...
Change while_let_loop applicability to HasPlaceholders
The suggestion has been changed at some point to use `..` in the suggested code.
Due to that we can't make the lint MachineApplicable anymore.
cc #3630
2019-04-17 01:14:27 +00:00
Philipp Hansch
e974d84d03
while_let_loop uses placeholders in suggestions
...
Due to that we can't make the lint MachineApplicable anymore.
2019-04-16 20:05:16 +02:00
Manish Goregaokar
e9cde416ba
Only suggest .copied() for Option right now
2019-04-15 15:44:09 -07:00
Manish Goregaokar
ad2c65bd1b
Also suggest .copied() when .clone() is called on a Copy type
2019-04-15 14:39:41 -07:00
Manish Goregaokar
d2f7ae70ae
Suggest .copied() instead of .cloned() in map_clone when dealing with references
2019-04-15 14:32:39 -07:00
flip1995
445fa3b529
Deny rustc internal lints
2019-04-15 13:21:52 +02:00
flip1995
5361b842d1
Remove clippy::default_hash_types internal lint
2019-04-15 13:21:52 +02:00
Manish Goregaokar
2156f6733e
Clean up unused cx parameters
2019-04-14 13:23:43 -07:00
Manish Goregaokar
3c93a95b1f
HirIdify ReadVisitor
2019-04-14 13:18:34 -07:00
Manish Goregaokar
0c6956f8ce
Use _from_hir_id APIs
2019-04-14 13:15:20 -07:00
Manish Goregaokar
1b2f2be085
Remove now-unnecessary calls to node_to_hir_id
2019-04-14 13:11:31 -07:00
Philipp Hansch
289a9af801
cargo fmt
2019-04-14 15:07:15 +02:00
Philipp Hansch
ad27e3ff9b
Refactor suspicious_else_formatting using if_chain
2019-04-14 11:12:51 +02:00
Philipp Hansch
96c34e85c4
Remove except
in suspicious_else_formatting
...
This was causing two different ICEs in #3741 .
The first was fixed in #3925 .
The second one is fixed with this commit: We just don't `expect`
anymore. If the snippet doesn't contain an `else`, we stop emitting the
lint because it's not a suspiciously formatted else anyway.
2019-04-14 11:04:41 +02:00
bors
d516925ec8
Auto merge of #3946 - rchaser53:issue-3920, r=flip1995
...
fix format does not parse escaped braces error
related: https://github.com/rust-lang/rust-clippy/issues/3920
2019-04-12 17:03:01 +00:00
rchaser53
db6ca9b8d3
fix format does not parse escaped braces error
2019-04-13 01:39:10 +09:00
flip1995
3fe5eea4e4
Fix get_def_path
...
This fix is obsolet once rust-lang/rust#59779 and #3926 is merged.
2019-04-12 11:59:06 +02:00
bors
2278814c8e
Auto merge of #3931 - phansch:3891, r=flip1995
...
Fix ICE in decimal_literal_representation lint
Handling the integer parsing properly instead of just unwrapping.
Note that the test is not catching the ICE because plain UI tests
[currently hide ICEs][compiletest_issue]. Once that issue is fixed, this
test would fail properly again.
Fixes #3891
[compiletest_issue]: https://github.com/laumann/compiletest-rs/issues/169
2019-04-10 20:57:15 +00:00
Philipp Hansch
ab6b949224
Refactor check_lit method
2019-04-10 21:05:56 +02:00
Tomas Koutsky
603996c9d5
Support updated type dependent def ID getter
2019-04-10 16:18:02 +02:00
Philipp Hansch
1fd2451b90
Code formatting/cleanup
2019-04-10 07:50:34 +02:00
Philipp Hansch
2b0dc39f5b
Don't emit useless_attribute lint in external macros
2019-04-10 07:30:59 +02:00
bors
37f5c1ec73
Auto merge of #3925 - phansch:3741, r=flip1995
...
Fix ICE in suspicious_else_formatting
Fixes #3741
2019-04-09 07:13:08 +00:00
Philipp Hansch
0307ff020c
Fix ICE in decimal_literal_representation lint
...
Handling the integer parsing properly instead of just unwrapping.
Note that the test is not catching the ICE because plain UI tests
[currently hide ICEs][compiletest_issue]. Once that issue is fixed, this
test would fail properly again.
[compiletest_issue]: https://github.com/laumann/compiletest-rs/issues/169
2019-04-08 22:16:34 +02:00
Klemen Košir
560fd163d6
Escape a single quote in single_char_pattern hint
2019-04-08 21:55:50 +09:00
bors
4fdd113bed
Auto merge of #3921 - euclio:single-char-names-multispan, r=flip1995
...
use a multispan for MANY_SINGLE_CHAR_NAMES
2019-04-08 08:42:13 +00:00
bors
e91ba8af85
Auto merge of #3848 - felix91gr:null_transmute, r=flip1995
...
Transmuting known null ptr to ref
Working on implementing #628
2019-04-08 07:20:25 +00:00
bors
42e1cf3763
Auto merge of #3901 - rail-rain:issue_1670, r=flip1995
...
Fix `explicit_counter_loop` suggestion
#1670
This code seems to me to work, but I have two question.
* Because range expression desugared in hir, `Sugg::hir` doesn't add parenthesis to range expression. Which function is better to check range do you think, `check_for_loop_explicit_counter` or `hir_from_snippet`?
* Do you think we need to distinguish between range expression and struct expression that creates `std::ops::Range*`?
2019-04-08 06:28:15 +00:00
Philipp Hansch
547c5c0667
cargo fmt
2019-04-08 07:56:54 +02:00
Philipp Hansch
60c1bb0546
Fix ICE in suspicious_else_formatting
2019-04-07 11:11:06 +02:00
Andy Russell
0d50d44ea6
use a multispan for MANY_SINGLE_CHAR_NAMES
2019-04-05 10:07:39 -04:00
Matthias Krüger
920e47ceb5
NFC: fix typos
2019-04-04 11:15:30 +02:00
Matthias Krüger
c81e43b92c
rustup https://github.com/rust-lang/rust/pull/59657
...
commit: 4122d2221ec65232bc211a266d0796a4713e0d39
2019-04-03 10:48:54 +02:00
Félix Fischer
069957a8ad
Add TransmutingNull Lint
...
* Late Lint pass, catches:
* One liner: 0 -> null -> transmute
* One liner: std:null() -> transmute
* Const (which resolves to null) -> transmute
* UI Test case for Lint
* Updated test for issue 3849, because now the lint that code generated is in Clippy.
* Expanded `const.rs` miri-based Constant Folding code, to cover
raw pointers
2019-04-02 11:39:43 -03:00
Philipp Hansch
b253c564d5
Rustup to https://github.com/rust-lang/rust/pull/58805
2019-04-01 20:37:05 +02:00
Félix Fischer
491f72442e
Updated source to match with recent rustc master
toolchain changes
2019-04-01 20:37:05 +02:00
flip1995
bbb7963735
Fix dogfood error of question_mark lint fix
2019-04-01 20:37:05 +02:00
flip1995
6f01ecfefd
Fix question_mark lint+test
2019-04-01 20:37:05 +02:00
rail
2b82c71b55
use span_lint_and_sugg
in explicit_counter_loop
2019-03-28 08:51:57 +09:00
Félix Fischer
3cff06a0eb
Fix some test failures
2019-03-26 13:57:03 -03:00
Oliver Scherer
d020565ed2
Hacky rustup
2019-03-26 10:55:03 +01:00
Matthias Krüger
b5d82524b4
run cargo fmt
2019-03-23 23:39:58 +01:00
Matthias Krüger
e17dd4efa9
rustup https://github.com/rust-lang/rust/pull/59096/
2019-03-23 23:37:38 +01:00
rail
9698e41994
Change explicit_counter_loop's message to add parentheses if necessary
2019-03-23 15:36:48 +09:00
rail
bd6c2df066
Change explicit_counter_loop's message to reflect original variable name
2019-03-23 15:30:17 +09:00
Mateusz Mikuła
6cb0605600
Cargo fmt
2019-03-18 13:39:11 +01:00
Mateusz Mikuła
664391c5f8
Drop range_contains feature
2019-03-18 12:54:10 +01:00
Mateusz Mikuła
8feb2c6b2f
Fix rustfmt::skip detection
2019-03-18 12:54:10 +01:00
Mateusz Mikuła
fb7699d9e5
Rework clippy detection in attribute lint
2019-03-18 12:54:10 +01:00
Mateusz Mikuła
0ea5e38a9e
name -> check_name
2019-03-18 12:54:10 +01:00
Mateusz Mikuła
4bb6c87b08
span -> span()
2019-03-18 12:54:10 +01:00
Mateusz Mikuła
b25564fc8a
name -> ident_str
2019-03-18 12:54:10 +01:00
Mateusz Mikuła
e63a685412
NestedMetaItemKind -> NestedMetaItem
2019-03-18 12:54:10 +01:00
Mateusz Mikuła
cf71caa71d
Drop redundant &
2019-03-18 12:54:10 +01:00
Mateusz Mikuła
cb3aa7480c
Fix path_qualified
...
As suggested by eddyb
2019-03-18 12:54:10 +01:00
Mateusz Mikuła
9b7ff501a6
Replace most of ty:Ty with Ty
2019-03-18 12:54:10 +01:00
flip1995
4832a853c7
Feed dog
2019-03-16 15:39:02 +01:00
flip1995
180e07e99e
Adapt paths to new formatting
2019-03-16 15:22:31 +01:00
flip1995
3c4616d303
cargo fmt
2019-03-16 11:51:57 +01:00
flip1995
254fad95de
Use LocalInternedString inside of AbsolutePathPrinter
2019-03-16 11:45:29 +01:00
flip1995
dae5c9c685
AbsolutePathBuffer -> AbsolutePathPrinter
2019-03-16 11:17:36 +01:00
flip1995
2d8618e95c
Remove ty::TyKind from eta_reduction and replace it with ty::Ty
2019-03-16 11:10:33 +01:00
flip1995
8eadbfd35b
parent_def_id -> parent
2019-03-15 23:44:04 +01:00
flip1995
dcbd3aefa2
item_path_str -> def_path_str
2019-03-15 23:43:42 +01:00
flip1995
31435cd7f5
Reimplement AbsolutePathBuffer
2019-03-15 23:42:46 +01:00
bors
e7806413c6
Auto merge of #3883 - daxpedda:missing_docs_in_private_items, r=phansch
...
Add `doc(include = ...)` detection to `missing_docs_in_private_items`
The whole `missing documentation in crate` part doesn't have any tests. If I should add test cases tell me.
2019-03-15 06:18:28 +00:00
daxpedda
e1096e3310
Add a test for doc(include)
...
Tiny code improvement.
2019-03-14 19:33:06 +01:00
daxpedda
177b3b27c4
Add doc(include = ...)
detection to missing_docs_in_private_items
2019-03-14 18:32:39 +01:00
bors
9df38117d9
Auto merge of #3877 - rink1969:3842, r=flip1995
...
casting integer literal to float is unnecessary
fix issue https://github.com/rust-lang/rust-clippy/issues/3842
2019-03-14 16:32:15 +00:00
rink1969
d9dd008e44
casting integer literal to float is unnecessary
2019-03-14 15:53:08 +08:00
bors
99fdf2607e
Auto merge of #3873 - phansch:hiridification, r=flip1995
...
Some more HirId-ification
* 8a59f81
: Rename span_lint_node* functions to span_lint_hir*
* a457258
: Use `HirId` instead of `NodeId` for lookup
2019-03-13 08:45:23 +00:00
Philipp Hansch
bf86c1b989
cargo fmt
2019-03-13 06:51:57 +01:00
bors
8fc0a738e3
Auto merge of #3869 - taiki-e:use_self, r=flip1995
...
Fix `use_self` false positive on nested functions
Related to https://github.com/rust-lang/rust-clippy/pull/3640
The current `use_self` warns the following code.
```rust
#![warn(clippy::use_self)]
struct Foo {}
impl Foo {
fn bar() {
fn baz() -> Foo { //^ warning: unnecessary structure name repetition
Foo {} //^ warning: unnecessary structure name repetition
}
}
}
```
2019-03-12 12:09:56 +00:00
bors
3d31c2157a
Auto merge of #3794 - mikerite:fix-3739, r=phansch
...
Fix `boxed_local` suggestion
Don't warn about an argument that is moved into a closure.
ExprUseVisitor doesn't walk into nested bodies so use a new
visitor that collects the variables that are moved into closures.
Fixes #3739
2019-03-12 07:43:14 +00:00
Philipp Hansch
a457258132
Use HirId
instead of NodeId
for lookup
2019-03-12 08:21:22 +01:00
bors
75bfa29533
Auto merge of #3871 - taiki-e:needless_continue, r=phansch
...
Fix `needless_continue` false positive
If the `continue` has a label, check it matches the label of the loop.
Fixes https://github.com/rust-lang/rust-clippy/issues/2329
2019-03-12 07:04:44 +00:00
Philipp Hansch
8a59f81180
Rename span_lint_node* functions to span_lint_hir*
...
Because they now take a `hir_id` instead of a `node_id` argument.
2019-03-12 08:01:21 +01:00
bors
b586d76b43
Auto merge of #3865 - phansch:run_more_doc_tests, r=flip1995
...
Run more doc tests
This executes some more doc tests that were ignored before.
2019-03-12 06:22:00 +00:00
Michael Wright
6937d5581a
Merge branch 'master' into fix-3739
2019-03-12 08:13:44 +02:00
Philipp Hansch
9ca34e37fa
Run more doc tests
...
This executes some more doc tests that were ignored before.
2019-03-12 06:53:25 +01:00
Taiki Endo
1bc7da2fec
Fix needless_continue
false positive
2019-03-12 03:40:30 +09:00
Taiki Endo
187ce4c5ab
Fix use_self
false positive on nested functions
2019-03-11 23:24:49 +09:00
Taiki Endo
4896b259eb
Filter out proc_macro and proc_macro_attribute
2019-03-11 20:45:57 +09:00
flip1995
72aeaa891b
Fix/Ignore doc tests
2019-03-10 23:01:56 +01:00
flip1995
44c46d2059
Run rustfmt
2019-03-10 22:12:26 +01:00
Alexander Regueiro
d2b85323ad
Addressed points raised in review.
2019-03-10 18:06:28 +00:00
Alexander Regueiro
d43966a176
Various cosmetic improvements.
2019-03-10 18:06:28 +00:00
Manish Goregaokar
038ec7f5d8
Move get_unwrap to restriction
...
fixes #3862
2019-03-09 13:48:06 -08:00
bors
ccfbfb8097
Auto merge of #3860 - phansch:refactor_out_opt_def_id, r=flip1995
...
Refactor: Remove utils::opt_def_id
This removes some indirection. Probably this method was uplifted to
rustc at some point?
2019-03-09 12:05:41 +00:00
Philipp Krones
c32135a87f
Rollup merge of #3857 - phansch:document_path_qpath, r=flip1995
...
Document match_path, improve match_qpath docs
Inching towards enabling `#[deny(missing_docs)]` in utils 📜
2019-03-09 12:24:44 +01:00
Philipp Krones
f69351e995
Rollup merge of #3852 - phansch:refactor_assign_ops, r=flip1995
...
Refactor: Cleanup one part of assign_ops lint
Removes a lot of indentation and separates lint emission from lint
logic. Only touches the `hir::ExprKind::AssignOp` part of the lint.
2019-03-09 12:24:43 +01:00
Philipp Krones
1902384d15
Rollup merge of #3851 - phansch:refactor_trait_stuff, r=flip1995
...
Refactor: Extract `trait_ref_of_method` function
This pattern was used in three places after #3844 , so I think it's worth moving it into `utils/mod.rs` and documenting it.
2019-03-09 12:24:42 +01:00
Philipp Hansch
9d97ed6faa
Refactor: Remove utils::opt_def_id
...
This removes some indirection. Probably this method was uplifted to
rustc at some point?
2019-03-08 14:14:41 +01:00
Philipp Hansch
f04acdd463
Document match_path, improve match_qpath docs
2019-03-08 09:50:20 +01:00
Philipp Hansch
9494f22f06
cargo fmt
2019-03-08 09:44:22 +01:00
Philipp Hansch
131b89b54e
fmt
2019-03-08 09:43:36 +01:00
Philipp Krones
837d675afd
Update clippy_lints/src/utils/mod.rs
...
Co-Authored-By: phansch <dev@phansch.net>
2019-03-08 09:40:12 +01:00
Philipp Hansch
65694cc6c8
Fix doctest
2019-03-08 09:10:41 +01:00
Philipp Hansch
5c9221f880
Refactor: Cleanup one part of assign_ops lint
...
Removes a lot of indentation and separates lint emission from lint
logic. Only touches the `hir::ExprKind::AssignOp` part of the lint.
2019-03-08 09:01:29 +01:00
ljedrz
5d78250c75
align with rust-lang/rust/#58992
2019-03-07 21:51:05 +01:00
rchaser53
ae787d954e
fix missing a semicolon
2019-03-07 23:26:47 +09:00
Philipp Hansch
e1d47cd5f1
Refactor: Extract trait_ref_of_method
function
2019-03-07 08:17:43 +01:00
Félix Fischer
ddc718087f
Renamed: Cyclomatic Complexity -> Cognitive Complexity
...
* Ran automatic naming update
* Formalized rename of `cyclomatic_complexity` to `cognitive_complexity`
** Added the rename to `lib.rs`
** Added rename test
* Added warning for deprecated key `cyclomatic_complexity_threshold` and tests for it
* Added deprecation status for Clippy's builtin attribute
* Updated tests for new builtin attribute renaming
2019-03-06 10:07:38 -03:00
Andy Russell
a9de64a151
fix or ignore failing doc tests
2019-03-05 18:45:08 -05:00
Andy Russell
fe96ffeac9
move lint documentation into macro invocations
2019-03-05 18:45:08 -05:00
Philipp Hansch
15cba2e956
Fix missing_const_for_fn for impl trait methods
2019-03-05 08:11:55 +01:00
Philipp Hansch
b87f5bc55a
Don't trigger missing_const_for_fn in external macros
...
As reported in #3841 . Only fixes the part where it triggers on the
`derive`.
2019-03-04 22:56:33 +01:00
Philipp Hansch
68096cf181
fmt fixes
2019-03-03 13:05:39 +01:00
ljedrz
f3363b9cf2
align with rust-lang/rust/#58836
2019-03-01 19:10:14 +01:00
ljedrz
f2587703cc
enable rust-lang/rust#58754
2019-03-01 19:10:14 +01:00
Santiago Pastorino
77a67c914d
Place::Local(x) is now Place::Base(PlaceBase::Local(x))
2019-03-01 12:20:17 -03:00
flip1995
1463d6f69f
Error an unknown or deprecated Clippy attribute
2019-02-28 16:44:42 +01:00
bors
ff2798840c
Auto merge of #3666 - detrumi:map-or-on-non-copy, r=flip1995
...
Only suggest map_or for copy types
Fixes #2686
2019-02-27 08:28:48 +00:00
Philipp Hansch
982a99d2c4
Rustup https://github.com/rust-lang/rust/pull/58321
2019-02-27 07:20:49 +01:00
bors
6e8931c5f5
Auto merge of #3821 - g-bartoszek:redundant_closure-different-borrow-levels, r=oli-obk
...
do not trigger redundant_closure when there is a difference in borrow…
… level between closure parameter and "self", fixes #3802
2019-02-26 17:30:48 +00:00
Wilco Kusee
eb70a72459
Fix false negative
2019-02-26 17:29:36 +01:00
Wilco Kusee
fec6e55d1d
Attempt to fix false negative
2019-02-26 17:27:41 +01:00
Wilco Kusee
4cf720abbe
Move lint_map_unwrap_or to its own file
2019-02-26 17:27:41 +01:00
Wilco Kusee
54ab22f6db
Only suggest map_or for copy types
2019-02-26 17:27:40 +01:00
bors
0957f7d3b7
Auto merge of #3817 - rust-lang:fix-bool_comparison-on-non-bool, r=oli-obk
...
Fix `bool_comparison` with non-`bool` expressions
Fixes #3703 .
It just moves around the type check that was already there for some comparison to all of them, because if one type isn't `bool`, none of those comparison can be simplified.
2019-02-26 15:51:40 +00:00
Grzegorz
a7f4d41a7d
do not trigger redundant_closure when there is a difference in borrow level between closure parameter and "self"
2019-02-26 12:12:27 +01:00
bors
412d41ae86
Auto merge of #3814 - ljedrz:HirIdification_lockstep_upgrade, r=phansch
...
HirIdify some lints
Unblocks https://github.com/rust-lang/rust/pull/58561 (a part of [rust-lang/rust#57578 ](https://github.com/rust-lang/rust/pull/57578 )). Can we branch it like with https://github.com/rust-lang/rust-clippy/pull/3790 ? I can rebase on a different commit if need be.
Haven't had time to run tests yet, so I'd wait for Travis 🙈 .
2019-02-26 10:43:50 +00:00
ljedrz
c1b65ec363
fix line format
2019-02-26 11:21:07 +01:00
Michael Wright
c9d79c0c5e
Remove #[feature(try_from)]
...
`try_from` is now stable.
2019-02-26 08:43:47 +02:00
mcarton
c0c0686a65
Fix bool_comparison
with non-bool
expressions
2019-02-25 22:31:16 +01:00
bors
50d9473856
Auto merge of #3808 - mikerite:useless-format-suggestions, r=oli-obk
...
Fix `useless_format` suggestions
2019-02-25 16:21:26 +00:00
bors
2141ebf695
Auto merge of #3816 - g-bartoszek:redundant_closure_for_macros, r=Manishearth
...
do not trigger redundant_closure for external macros
fixes #3791
2019-02-25 13:46:31 +00:00
Grzegorz
41f197460f
redundant_closure does not trigger for external macros
2019-02-25 13:40:28 +01:00
bors
1ac6f4e9ae
Auto merge of #3772 - flip1995:ice-3719, r=Manishearth
...
Fix ICE #3719+#3718 in lint match_ref_pats
Fixes #3719
This conveniently also fixes #3718
The ICE occurs when the match expression was a macro call, where the macro was defined in another file. Since we don't have the ability to reproduce this behavior with our UI tests (AFAIK), I couldn't add a test reproducing this ICE.. However, I added a test which is related to the ICE, to show the new behavior of the lint.
I tested it with the mscheme repo locally and the ICE didn't happen anymore.
r? @matthiaskrgr
2019-02-25 12:30:35 +00:00
bors
cd29740e6e
Auto merge of #3805 - martinsp:ice-3747, r=Manishearth
...
Fix ICE #3747
I'm not sure if this was the correct approach.
I don't know if I put tests/ui/crashses/ice-3747.rs in correct place because the test always passed when I ran it with `cargo test`, even without the fix applied.
If I run that test with `env CLIPPY_TESTS=true cargo run --bin clippy-driver -- -L ./target/debug tests/ui/crashes/ice-3747.rs` then the test correctly fails without the fix applied
fixes #3747
2019-02-25 12:08:43 +00:00
ljedrz
7bc2e1d60d
fix: replace wrong id
2019-02-25 11:06:46 +01:00
Philipp Hansch
bd949328f1
Make DiagnosticWrapper private
...
It's doesn't have to be public anywhere outside of clippy_lints
2019-02-25 07:19:56 +01:00
ljedrz
8dac8a6ba4
HirIdify some lints
2019-02-24 20:49:43 +01:00
bors
5833e4d26e
Auto merge of #3810 - phansch:refactor/extract_module, r=flip1995
...
Extract diagnostics module and document some functions
This moves the lint building functions from `utils/mod.rs` to their own
`utils/diagnostics.rs` file. Also adds documentation for three of them.
2019-02-24 15:35:01 +00:00
bors
1ce961f083
Auto merge of #3790 - ljedrz:HirIdify_intravisit, r=phansch
...
partially HirIdify lints
Enables https://github.com/rust-lang/rust/pull/58232 (a part of https://github.com/rust-lang/rust/pull/57578 ).
2019-02-24 14:32:55 +00:00
ljedrz
601cbc6d84
fix formatting
2019-02-24 15:16:16 +01:00
Philipp Hansch
7d883cddbc
Extract diagnostics module and document some functions
...
This moves the lint building functions from `utils/mod.rs` to their own
`utils/diagnostics.rs` file. Also adds documentation for three of them.
2019-02-24 14:11:05 +01:00
Philipp Hansch
ff1b1a7c9f
Document some span_lint_*
util functions
2019-02-24 09:49:17 +01:00
Michael Wright
0182a6640e
Fix useless_format
suggestions
2019-02-24 07:30:08 +02:00
Martins Polakovs
391ee7987d
Fix ICE #3747
...
[Martins Polakovs, John Firebaugh]
2019-02-23 21:38:16 +02:00