Commit Graph

164 Commits

Author SHA1 Message Date
Aleksey Kladov
5a854a7253 internal: move tests 2021-10-10 12:39:58 +03:00
bors[bot]
86c534f244
Merge #10440
10440: Fix Clippy warnings and replace some `if let`s with `match` r=Veykril a=arzg

I decided to try fixing a bunch of Clippy warnings. I am aware of this project’s opinion of Clippy (I have read both [rust-lang/clippy#5537](https://github.com/rust-lang/rust-clippy/issues/5537) and [rust-analyzer/rowan#57 (comment)](https://github.com/rust-analyzer/rowan/pull/57#discussion_r415676159)), so I totally understand if part of or the entirety of this PR is rejected. In particular, I can see how the semicolons and `if let` vs `match` commits provide comparatively little benefit when compared to the ensuing churn.

I tried to separate each kind of change into its own commit to make it easier to discard certain changes. I also only applied Clippy suggestions where I thought they provided a definite improvement to the code (apart from semicolons, which is IMO more of a formatting/consistency question than a linting question). In the end I accumulated a list of 28 Clippy lints I ignored entirely.

Sidenote: I should really have asked about this on Zulip before going through all 1,555 `if let`s in the codebase to decide which ones definitely look better as `match` :P

Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
2021-10-05 08:58:40 +00:00
Aramis Razzaghipour
eff195852d
Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00
Lukas Wirth
992b4648d9 feat: Hide type inlay hints for constructors 2021-10-03 14:53:18 +02:00
Aramis Razzaghipour
55c0b86cde
Add semicolons for consistency
`clippy::semicolon_if_nothing_returned`
2021-10-03 23:39:43 +11:00
Jonas Schievink
0b76b29512 support non-extern-prelude dependencies 2021-09-28 21:23:46 +02:00
Lukas Wirth
3987bf5d6f Simplify 2021-09-19 19:00:06 +02:00
Lukas Wirth
edc915fbb6 Add proc-macro fixture directive 2021-09-13 18:37:50 +02:00
Florian Diebold
424dda8113 Refactor & improve handling of overloaded binary operators
Fixes #9971. Also records them as method resolutions, which we could use
later.
2021-08-22 17:35:50 +02:00
Lukas Wirth
ec443886ea Show type actions on ranged type hover 2021-08-11 13:52:57 +02:00
Lukas Wirth
b7d7dd6163 Implement bool_then_to_if assist 2021-08-10 13:17:45 +02:00
Yoshua Wuyts
ec2535e9ce impl gen hash for enums 2021-08-10 12:37:10 +02:00
Yoshua Wuyts
f424cd9c7e
Update crates/test_utils/src/minicore.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-08-09 00:00:09 +02:00
Yoshua Wuyts
f64aacc0c1 Use minicore 2021-08-08 18:58:42 +02:00
Lukas Wirth
01413dd7d4 extract_function does not move locals defined outside of loops 2021-08-04 20:00:45 +02:00
Jonas Schievink
3efdf6861f Complete editable private items 2021-07-23 19:57:16 +02:00
Lukas Wirth
2579dc6d82 Update inline_call assist doc example 2021-07-05 14:24:25 +02:00
Aleksey Kladov
86720f2953 minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
Florian Diebold
d340f28a81 test_utils: Make overlapping annotations possible 2021-06-20 19:12:06 +02:00
Aleksey Kladov
90da9fc9b3 minor: use minicore 2021-06-18 23:48:18 +03:00
Aleksey Kladov
991919e71f internal: add index to minicore 2021-06-18 22:37:34 +03:00
Aleksey Kladov
15c4b3fa7f internal: add Copy to minicore 2021-06-18 22:10:52 +03:00
Laurențiu Nicola
e3ce88f6f2 Minor clippy perf fixes 2021-06-18 14:40:51 +03:00
Aleksey Kladov
ebb591a570 internal: add derive and ord support to minicore 2021-06-18 00:30:22 +03:00
Aleksey Kladov
ca99aaa053 internal: add From to minicore 2021-06-17 21:04:12 +03:00
Aleksey Kladov
08c220ab2c internal: add default to minicore 2021-06-17 20:49:49 +03:00
Aleksey Kladov
c42cdff3d2 internal: minimize minicore
We want to keep minicore small, so let's split out iterator adapters and
sources into a separate `iterators` region, and use them only when
needed.
2021-06-17 11:28:44 +03:00
Aleksey Kladov
9b3aa591cd internal: switch some tests to minicore 2021-06-17 11:18:37 +03:00
Aleksey Kladov
35772256f8 internal: cleanup tests 2021-06-16 23:27:46 +03:00
Aleksey Kladov
ee7b649d44 internal: switch some tests to minicore 2021-06-16 22:54:57 +03:00
Aleksey Kladov
604267088c internal: add iterator to minicore 2021-06-16 22:48:48 +03:00
Aleksey Kladov
8a4d9bb80a internal: add fn to minicore 2021-06-16 12:15:45 +03:00
Aleksey Kladov
d2c9f3add1 internal: add deref_mut to minicore 2021-06-16 10:30:29 +03:00
Aleksey Kladov
0798cce9e5 internal: add result to minicore 2021-06-15 23:07:25 +03:00
Aleksey Kladov
2870d2bade internal: add option to minicore 2021-06-15 22:59:51 +03:00
Aleksey Kladov
3efe5c3426 internal: add future to minicore 2021-06-15 22:49:00 +03:00
Aleksey Kladov
2eef66a2ed internal: sanity-check minicore flags 2021-06-15 22:38:21 +03:00
Aleksey Kladov
0bb1f1bc90 internal: add ranges to minicore 2021-06-15 21:45:25 +03:00
Aleksey Kladov
7ebac5e54c internal: switch some tests to minicore 2021-06-15 21:34:26 +03:00
Aleksey Kladov
f841369fee internal: switch some tests to minicore 2021-06-15 21:11:53 +03:00
Aleksey Kladov
f521e41853 internal: introduce minicore -- a subset of libcore for testing 2021-06-15 21:03:08 +03:00
Aleksey Kladov
a1940d8c75 internal: check diagnostics in all files and not just the first one 2021-06-13 19:23:37 +03:00
Clemens Wasser
3c6dc0f89d Apply a few clippy suggestions 2021-06-03 11:46:03 +02:00
Lukas Wirth
a6b92a8cc0 simplify 2021-05-28 20:46:09 +02:00
Aleksey Kladov
6a16ec52aa internal: use API stabilized in 1.52 2021-05-06 20:12:15 +03:00
Aleksey Kladov
327323ad25 internal: fix flakiness of accidentally quadratic test 2021-04-13 12:56:24 +03:00
Aleksey Kladov
e012efca27 Let's try testing for "is not quadratic" condition 2021-04-10 12:43:07 +03:00
Kirill Bulatov
e785672f15 Adjust fixture docs a bit 2021-04-06 21:42:27 +03:00
Lukas Wirth
75fafd6fcc Add new_source_root meta to test fixtures 2021-03-16 15:28:02 +01:00
Laurențiu Nicola
fc9eed4836 Use upstream cov-mark 2021-03-08 22:19:44 +02:00