about summary refs log tree commit diff
path: root/src/tools/clippy/tests
AgeCommit message (Collapse)AuthorLines
2023-07-13Rename cast_ref_to_mut to invalid_reference_casting (clippy side)Urgau-5/+5
2023-07-12Ignore flaky clippy tests.Eric Huss-0/+9
2023-07-11Auto merge of #111717 - Urgau:uplift_fn_null_check, r=oli-obkbors-118/+63
Uplift `clippy::fn_null_check` lint This PR aims at uplifting the `clippy::fn_null_check` lint into rustc. ## `incorrect_fn_null_checks` (warn-by-default) The `incorrect_fn_null_checks` lint checks for expression that checks if a function pointer is null. ### Example ```rust let fn_ptr: fn() = /* somehow obtained nullable function pointer */ if (fn_ptr as *const ()).is_null() { /* ... */ } ``` ### Explanation Function pointers are assumed to be non-null, checking for their nullity is incorrect. ----- Mostly followed the instructions for uplifting a clippy lint described here: https://github.com/rust-lang/rust/pull/99696#pullrequestreview-1134072751 `@rustbot` label: +I-lang-nominated r? compiler
2023-07-10Drop uplifted `clippy::fn_null_check`Urgau-118/+63
2023-07-08Delete `to_string_in_format_args_incremental.rs`Nilstrieb-19/+0
It fails CI and passes locally. It passes random directores in `-Cincremental` so maybe something's up. It shouldn't block us here.
2023-07-07Fix failing clippy testsAlex Macleod-40/+20
Comments out the C string literals due to https://github.com/rust-lang/rust/pull/113334 Fixes https://github.com/rust-lang/rust-clippy/issues/11121
2023-07-02Fix compile-test tests to work with the new ui_test cratePhilipp Krones-9/+3
2023-07-02Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyupPhilipp Krones-4122/+15190
2023-06-26Make simd_shuffle_indices use valtreesOli Scherer-0/+12
2023-06-25Do not offer any of the suggestions in emit_coerce_suggestions for expr from ↵yukang-5/+0
destructuring assignment desugaring
2023-06-21Auto merge of #106450 - albertlarsan68:fix-arc-ptr-eq, r=Amanieubors-23/+7
Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata FCP completed in https://github.com/rust-lang/rust/issues/103763#issuecomment-1362267967 Closes #103763
2023-06-18Treat TAIT equation as always ambiguous in coherenceMichael Goulet-14/+25
2023-06-16Add `AliasKind::Weak` for type aliases.Oli Scherer-76/+50
Only use it when the type alias contains an opaque type. Also does wf-checking on such type aliases.
2023-06-15Extend `unused_must_use` to cover block exprs许杰友 Jieyou Xu (Joe)-26/+28
2023-06-10Drop uplifted `clippy:cmp_nan`Urgau-242/+69
2023-06-08Drop uplifted clippy::undropped_manually_dropsUrgau-96/+61
2023-06-02Auto merge of #112203 - flip1995:clippyup, r=Manishearthbors-357/+2069
Update Clippy r? `@Manishearth`
2023-06-02Merge commit '30448e8cf98d4754350db0c959644564f317bc0f' into clippyupPhilipp Krones-357/+2069
2023-06-02Auto merge of #112198 - compiler-errors:rollup-o2xe4of, r=compiler-errorsbors-13/+15
Rollup of 7 pull requests Successful merges: - #111670 (Require that const param tys implement `ConstParamTy`) - #111914 (CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(Bi…) - #112030 (Migrate `item_trait_alias` to Askama) - #112150 (Support 128-bit atomics on all x86_64 Apple targets) - #112174 (Fix broken link) - #112190 (Improve comments on `TyCtxt` and `GlobalCtxt`.) - #112193 (Check tuple elements are `Sized` in `offset_of`) Failed merges: - #112071 (Group rfcs tests) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-01Implement custom diagnostic for ConstParamTyMichael Goulet-13/+15
2023-06-01Use translatable diagnostics in `rustc_const_eval`Deadbeef-3/+3
2023-05-31Drop uplifted clippy::cast_ref_to_mutUrgau-103/+60
2023-05-27Drop uplifted clippy::invalid_utf8_in_uncheckedUrgau-91/+59
2023-05-21Rename `forget_ref` lint to `forgetting_references`Urgau-5/+5
2023-05-21Rename `drop_ref` lint to `dropping_references`Urgau-5/+5
2023-05-21Rename `forget_copy` lint to `forgetting_copy_types`Urgau-6/+6
2023-05-21Rename `drop_copy` lint to `dropping_copy_types`Urgau-6/+6
2023-05-20Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyupPhilipp Krones-548/+1331
2023-05-17Exclude inherent projections from some alias ty matchesLeón Orell Valerian Liehr-0/+13
2023-05-14Exposes false negative in clippy's diverging_sub_expressionDavid Tolnay-9/+1
2023-05-10Drop uplifted clippy::forget_copyUrgau-246/+58
2023-05-10Drop uplifted clippy::forget_refUrgau-208/+57
2023-05-10Drop uplifted clippy::drop_copyUrgau-89/+99
2023-05-10Drop uplifted clippy::drop_refUrgau-289/+55
2023-05-05Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyupPhilipp Krones-169/+1639
2023-05-02Rollup merge of #110955 - fee1-dead-contrib:sus-operation, r=compiler-errorsDylan DPC-107/+58
uplift `clippy::clone_double_ref` as `suspicious_double_ref_op` Split from #109842. r? ``@compiler-errors``
2023-04-28uplift `clippy::clone_double_ref` as `suspicious_double_ref_op`Deadbeef-107/+58
2023-04-27Make clippy happyMichael Goulet-12/+12
2023-04-26Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadataAlbert Larsan-23/+7
2023-04-23Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyupPhilipp Krones-1251/+1558
2023-04-21Evaluate place expression in `PlaceMention`.Camille GILLOT-8/+8
2023-04-18clippy: add test for https://github.com/rust-lang/rust-clippy/issues/10645Matthias Krüger-1/+20
2023-04-14Auto merge of #110160 - petrochenkov:notagain2, r=cjgillotbors-2/+2
resolve: Pre-compute non-reexport module children Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
2023-04-12Special-case item attributes in the suggestion outputEsteban Küber-9/+0
2023-04-12Tweak output for 'add line' suggestionEsteban Küber-11/+28
2023-04-12resolve: Pre-compute non-reexport module childrenVadim Petrochenkov-2/+2
Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
2023-04-11Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyupPhilipp Krones-347/+2783
2023-03-29Stabilize a portion of 'once_cell'Trevor Gross-4/+4
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
2023-03-27Add notes to non-structural const in pattern error messageJamen Marz-0/+2
2023-03-24Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyupPhilipp Krones-1297/+2271