Guillaume Gomez
a05d3a4137
Automatic generation of error annotations for ui tests
2023-08-22 17:18:11 +02:00
Oli Scherer
3d88fae050
Update ui test crate
2023-08-11 14:02:28 +00:00
Milo Moisson
30d06a810c
ptr_arg should ignore extern functions
2023-07-23 17:10:13 +02:00
Guillaume Gomez
c62c7fadac
Update UI tests with new needless_pass_by_ref_mut
lint
2023-07-03 22:25:36 +02:00
Catherine
db4efe3f6d
Don't lint ptr_arg
when return type uses Cow's lifetime
2023-06-24 03:26:40 -05:00
Jason Newcomb
344b7bca86
Don't lint ptr_arg
when used as an incompatible trait object
2022-10-14 13:21:59 -04:00
xFrednet
e7c55a478f
Fix #[expect]
for clippy::ptr_arg
2022-06-25 14:16:28 +02:00
Max Baumann
9be3945be7
fix existing clippy tests
2022-03-30 20:12:58 +02:00
Jason Newcomb
851e715e5a
Don't lint ptr_arg
on &mut Cow<_>
2022-03-16 12:00:27 -04:00
Jason Newcomb
382b3f0601
Fix counting the number of unchangeable arguments in ptr_arg
2022-02-23 01:04:49 -05:00
Jason Newcomb
66bb7263b5
Don't lint ptr_arg
for &mut _
types in trait items
2022-01-29 12:03:54 -05:00
Jason Newcomb
048297b5b2
ptr_arg
cleanup
2022-01-21 09:43:41 -05:00
Jason Newcomb
7ed86bf822
Changes to ptr_arg
...
* Track the argument when used to initialize simple `let` bindings
* Check if the argument is passed to a function requiring the original type
* Use `multipart_suggestion` rather than multiple suggestions
* Check if the name given in the source code matches the name of the actual type
2022-01-12 20:57:50 -05:00
bors
dbe167daaa
Auto merge of #7890 - Alexendoo:ptr-arg-alias, r=camsteffen
...
Ignore references to type aliases in ptr_arg
Works using the fact that the hir path will point to a TyAlias, rather than being resolved to the underlying type
Fixes #7699
changelog: [`ptr_arg`] No longer lints references to type aliases
2021-10-29 19:45:26 +00:00
Cameron Steffen
d8fcfd7d64
Move if_then_panic to pedantic
2021-10-28 09:38:01 -05:00
Alex Macleod
e2c30f05c1
Ignore references to type aliases in ptr_arg
...
Works using the fact that the hir path will point to a TyAlias, rather
than being resolved to the underlying type
2021-10-27 19:08:42 +01:00
Labelray
543b638dbe
Add new lint if_then_panic
2021-09-24 22:14:20 +08:00
David Tolnay
c2783c1dcb
Downgrade many_single_char_names to pedantic
2021-09-14 09:59:06 -07:00
Aleksei Latyshev
203715aa4e
don't ignore expression after first not matched method call in PtrCloneVisitor
2020-12-28 01:09:04 +03:00
Aleksei Latyshev
dfaea9c967
lint &PathBuf instead of &Path in PTR_ARG
...
- extract get_only_generic_arg_snippet to improve readability
2020-12-25 15:06:34 +03:00
Eduardo Broto
a1824e187c
ptr_arg: honor allow
attr on arguments
2020-05-25 23:09:06 +02:00
Shotaro Yamada
555f5a49a2
Test fixes
2019-10-03 08:10:29 +09: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
Matthias Krüger
435299be30
rustfmt tests
2018-12-09 23:26:16 +01:00
Oliver Scherer
b8654eaa6c
Stabilize tool lints
2018-10-11 12:16:22 +02:00
Manish Goregaokar
e9c025ea70
Add license header to Rust files
2018-10-06 09:43:08 -07:00
Josh Mcguigan
0f6d422817
Added test case for ptr_arg
2018-09-05 05:59:07 -07:00
flip1995
1b6f6051a8
Adapt ui-tests to the tool_lints
2018-08-29 11:08:29 -07:00
Michael Wright
2fd671e4bd
Move ref cow tests
...
This commit moves the ref cow tests from needless_borrow.rs to ptr_arg.rs
where all the other PTR_ARG tests are.
2018-04-05 18:13:39 +02:00
Oliver Schneider
50ffaca4c9
Reduce the hackiness of cargo-clippy
2017-10-03 12:07:24 +02:00
Andre Bogus
1e0268fda8
avoid linting ptr_arg
if .capacity()
is called. Also suggest removing .as_str()
where applicable.
...
THis fixes #2070 .
Also fixes a few formatting mishaps
2017-09-20 23:59:23 +02:00
Andre Bogus
72be166756
add suggestions for .clone() in ptr_arg fns
2017-09-16 09:10:26 +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
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