Commit Graph

69 Commits

Author SHA1 Message Date
Guillaume Gomez 1f94d55a18 Fix new tests updates 2025-02-15 13:38:42 +01:00
Guillaume Gomez f666fd6417 Update UI tests 2025-02-15 13:38:16 +01:00
Lzu Tao 9ea2b6501e add test to check for popping wrong items
co-authored-by: Alex Macleod <alex@macleod.io>
2025-02-06 14:34:55 +07:00
Lzu Tao bcfd0d1aba Skip use_self inside macro expansion of impl Self items 2025-02-06 14:34:55 +07:00
Lzu Tao e3e6e6ea41 add bug 13092 2025-02-06 14:31:39 +07:00
Philipp Krones 277303b210 Merge remote-tracking branch 'upstream/master' into rustup 2024-04-04 19:48:31 +02:00
Guillaume Gomez 8e0496170d Add ui test for missing_transmute_annotations 2024-03-24 00:47:59 +01:00
Philipp Krones 0e62b18435 Merge commit '9d6f41691ed9dbfaec2a2df2661c42451f2fe0d3' into clippy-subtree-update 2024-03-21 22:20:40 +01:00
Ethiraric f3879b3630 [use_self]: Make it aware of lifetimes
Have the lint trigger even if `Self` has generic lifetime parameters.

```rs
impl<'a> Foo<'a> {
    type Item = Foo<'a>; // Can be replaced with Self

    fn new() -> Self {
        Foo { // No lifetime, but they are inferred to be that of Self
              // Can be replaced as well
            ...
        }
    }

    // Don't replace `Foo<'b>`, the lifetime is different!
    fn eq<'b>(self, other: Foo<'b>) -> bool {
        ..
    }
```

Fixes #12381
2024-03-07 20:45:59 +01:00
Philipp Krones cc61aeea54 Merge commit '080b587854a73f2a8cbaecff1884860a78e2ff37' into clippyup 2023-08-24 21:32:12 +02:00
Oli Scherer 00919a4f92 Update ui test crate to auto-detect aux build crate kind 2023-08-11 14:02:35 +00:00
Oli Scherer 3d88fae050 Update ui test crate 2023-08-11 14:02:28 +00:00
Philipp Krones cb3ecf7b79 Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
Oli Scherer 5bd97ac17a Update tests 2023-06-26 14:13:07 +00:00
Philipp Krones a1b75c5108 Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup 2023-04-23 13:28:56 +02:00
Oli Scherer def1705a27 Update to a compiletest-rs version that requires //@ for commands 2023-04-20 14:44:03 +00:00
Philipp Krones cf8a67d9ad Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyup 2023-03-10 10:53:50 +01:00
Samuel Tardieu f531abcef5 Do not suggest using Self in const generic parameters 2023-02-19 11:59:02 +01:00
Philipp Krones d05e2865a0 Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup 2022-12-01 18:29:38 +01:00
Alex Macleod 461e219d1d Allow using clippy::msrv as an outer attribute 2022-11-27 12:43:17 +00:00
flip1995 cd0bb7de01 Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyup 2022-10-23 15:18:45 +02:00
Alex Macleod 815876d93f Move MSRV tests into the lint specific test files 2022-10-21 21:35:39 +00:00
David Koloski 4d015293d1 Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-from-clippy 2022-09-21 13:13:27 -04:00
kraktus c433d542cf Do not lint use_self in proc macro expansion 2022-09-10 11:42:37 +02:00
Philipp Krones f067783461 Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup 2022-06-04 13:34:07 +02:00
Micha White 2aa4569303 Triggered the lint on tuple struct and struct patterns 2022-05-30 13:39:18 -04:00
flip1995 71131351de Merge commit '984330a6ee3c4d15626685d6dc8b7b759ff630bd' into clippyup 2022-04-08 10:06:10 +01:00
Max Baumann 9be3945be7 fix existing clippy tests 2022-03-30 20:12:58 +02:00
flip1995 d1b087fdee Merge commit 'dc5423ad448877e33cca28db2f1445c9c4473c75' into clippyup 2022-03-14 12:02:53 +01:00
Elliot Bobrow 914ae1e849 check use_self in pat 2022-02-26 09:23:29 -08:00
flip1995 e674d0a599 Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup 2021-11-04 12:52:36 +00:00
Andre Bogus a4ede72b3d update most tests to 2021 edition 2021-10-30 14:50:53 +02:00
flip1995 2b20f49841 Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup 2021-07-29 12:16:06 +02:00
flip1995 54e539121d Rename two lints to comply with our lint naming convention
self_named_constructor -> self_named_constructors
append_instead_of_extend -> extend_with_drain
2021-07-29 12:10:18 +02:00
flip1995 884ef4c287 Merge commit '4c41a222ca5d1325fb4b6709395bd06e766cc042' into clippyup 2021-07-19 11:52:05 +02:00
Anthony Huang 357a8f0344 Add redundant_method_names lint 2021-07-05 14:15:20 -04:00
flip1995 ebe52869a3 Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyup 2021-07-01 18:17:38 +02:00
Cameron Steffen 29b4b4c10d Do not lint use_self on type parameters 2021-05-27 20:18:07 -05:00
flip1995 97705b7ea6 Merge commit '9e3cd88718cd1912a515d26dbd9c4019fd5a9577' into clippyup 2021-05-20 13:07:57 +02:00
ThibsG 2fb35ce4f0 Add generic args for comparison in use_self and useless_conversion lints 2021-05-17 17:27:16 +02:00
flip1995 9f6b5de7de Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
flip1995 1f5f184105 Merge remote-tracking branch 'upstream/master' into rustup 2021-03-25 18:38:13 +01:00
Mateusz Gacek 032cdfe043 Adjust use_self uitest to proper self convention 2021-03-18 10:27:55 +01:00
Mateusz Gacek ea15fb2177 wrong_self_convention: to_ respects Copy types
More details here:
https://rust-lang.github.io/api-guidelines/naming.html#ad-hoc-conversions-follow-as_-to_-into_-conventions-c-conv
2021-03-17 22:00:46 +01:00
Vadim Petrochenkov 09a9ea69bf Update clippy tests 2021-03-16 00:12:38 +03:00
flip1995 f2f2a005b4 Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup 2021-03-12 15:30:50 +01:00
daxpedda 5656510eed Fix false-positive in use_self 2021-03-03 17:32:49 +01:00
Cameron Steffen ada8c72f3f Add version = "Two" to rustfmt.toml
Ignore UI tests since this change makes rustfmt less friendly with UI
test comments.
2021-03-01 16:17:33 -06:00
flip1995 f64149dd04 Merge commit '928e72dd10749875cbd412f74bfbfd7765dbcd8a' into clippyup 2021-02-25 11:25:22 +01:00
flip1995 da65d8166f Don't trigger use_self in macros 2021-02-10 11:57:28 +01:00