Aleksey Kladov
4584868a7a
internal: don't #[ignore] tests
...
See the style.md for motivation
2021-06-15 16:37:58 +03:00
bors[bot]
fa4c851619
Merge #9278
...
9278: internal: document that we don't #[ignore] tests r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-15 08:48:15 +00:00
Aleksey Kladov
3f4ad44082
internal: document that we don't #[ignore] tests
2021-06-15 11:46:47 +03:00
bors[bot]
447d849c9e
Merge #9277
...
9277: internal: more natural order of sources for TypeParam r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-14 19:44:59 +00:00
Aleksey Kladov
c2015e7d18
internal: more natural order of sources for TypeParam
...
We usually use first (left) variant of `Either` for "usual" case, and
use right for odd things. For example, pat source is Pat | SelfParam.
2021-06-14 22:42:43 +03:00
bors[bot]
27a70492f7
Merge #9275
...
9275: feat: Support goto type for field expressions and patterns r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-14 19:08:05 +00:00
Lukas Wirth
2c8e89b6f0
Support goto type for field expressions and patterns
2021-06-14 21:07:07 +02:00
Aleksey Kladov
94f7b63522
minor: less ambiguous name
2021-06-14 19:16:03 +03:00
Aleksey Kladov
da534bdd07
internal: flatten module hierarchy
...
It seems that any crate can be made better by flattening the modules
down to a single layer?
2021-06-14 19:14:34 +03:00
Aleksey Kladov
9fb67e7477
internal: document rename challenges
2021-06-14 19:08:12 +03:00
Aleksey Kladov
26c978f258
internal: adapt diagnostics to the new rename API
2021-06-14 18:46:54 +03:00
Aleksey Kladov
2e8dab631b
internal: prepare to move assist definitions
2021-06-14 17:45:17 +03:00
Aleksey Kladov
1d2772c2c7
internal: move diagnostics to a new crate
2021-06-14 17:45:17 +03:00
Aleksey Kladov
721feb1832
internal: prepare to move rename to base_db
...
It's better to handle magical cases upper in the stack, because it
allows for better re-use of the general implementation below. So, we
pull the `self` case up here.
The end goal is to put `Definition::rename` to the `ide_db`, because
it's a generally re-usable functionality useful for different ide
features, alongside with the search which is already there.
2021-06-14 17:28:39 +03:00
Aleksey Kladov
e696188672
fix: don't use display-related functionality where semantics matters
...
NavigationTarget is strictly a UI-level thing -- it describes where the
cursor should be placed when the user presses goto definition. It
doesn't make any semantic guaratees about rage and focus range and, as
such, is not suitable for driving renames.
2021-06-14 15:43:59 +03:00
Aleksey Kladov
500c909c76
internal: diagnostic code is mandatory
2021-06-13 22:17:36 +03:00
Aleksey Kladov
b404b91da6
minor: dead code
2021-06-13 22:11:33 +03:00
Aleksey Kladov
ff52167c9a
internal: kill diagnostic sink
2021-06-13 22:05:47 +03:00
Aleksey Kladov
935c53b92e
internal: use cov-mark rather than bailing out diagnostic
2021-06-13 21:55:51 +03:00
Aleksey Kladov
b292e1b9da
internal: refactor missing match arms diagnostics
2021-06-13 21:44:31 +03:00
Aleksey Kladov
3478897f86
internal: remove DiagnosticWithFix infra
2021-06-13 21:33:54 +03:00
Aleksey Kladov
fc30c5ccbe
internal: refactor incorrect case diagnostics
2021-06-13 21:09:03 +03:00
Aleksey Kladov
b66f4bb8d1
minor
2021-06-13 20:33:59 +03:00
Aleksey Kladov
de1fc70ccd
internal: refactor find_map diagnostic
2021-06-13 20:32:54 +03:00
Aleksey Kladov
24262f9ff6
minor
2021-06-13 20:20:58 +03:00
Aleksey Kladov
949a6ec469
internal: refactor missing or or some diagnostic
2021-06-13 20:19:11 +03:00
Aleksey Kladov
74f3cca85a
internal: refactor remove this semicolon diagnostics
2021-06-13 20:14:12 +03:00
Aleksey Kladov
8d391ec981
internal: refactor mismatched args count diagnostic
2021-06-13 20:06:25 +03:00
Aleksey Kladov
bccf77f26c
internal: refactor missing unsafe diagnostic
2021-06-13 20:01:01 +03:00
Aleksey Kladov
886b66cd03
internal: refactor BreakOutsideOfLoop diagnostic
2021-06-13 19:51:19 +03:00
Aleksey Kladov
7166e8549b
internal: refactor NoSuchField diagnostic
2021-06-13 19:45:16 +03:00
Aleksey Kladov
d3621eeb02
internal: refactor unimplemented builtin macro diagnostic
2021-06-13 19:35:30 +03:00
Aleksey Kladov
dec207f56a
minor: simplify
2021-06-13 19:27:24 +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
Aleksey Kladov
4af7a35197
internal: remove def-level diagnostics tests
2021-06-13 18:45:38 +03:00
Aleksey Kladov
00303284b5
internal: refactor macro error
2021-06-13 18:41:04 +03:00
Aleksey Kladov
1e4aaee7bb
internal: refactor unresolved proc macro diagnostic
2021-06-13 17:51:44 +03:00
Aleksey Kladov
f85e383b94
internal: refactor inactive code diagnostics
2021-06-13 17:29:25 +03:00
Aleksey Kladov
fa9ed4e0ce
internal: refactor unresolved macro call diagnostic
2021-06-13 17:08:54 +03:00
Aleksey Kladov
6d104de15a
internal: refactor unresolved import diagnostic
2021-06-13 16:42:34 +03:00
Aleksey Kladov
39f190b72c
internal: refactor unresolved extern crate diagnostic
2021-06-13 16:05:43 +03:00
Aleksey Kladov
6383252cc2
internal: unified missing fields diagnostic
2021-06-13 15:48:54 +03:00
Aleksey Kladov
c6509a4592
internal: move missing_fields diagnostics
2021-06-13 15:27:15 +03:00
Aleksey Kladov
efa069d288
internal: start new diagnostics API
...
At the moment, this moves only a single diagnostic, but the idea is
reafactor the rest to use the same pattern. We are going to have a
single file per diagnostic. This file will define diagnostics code,
rendering range and fixes, if any. It'll also have all of the tests.
This is similar to how we deal with assists.
After we refactor all diagnostics to follow this pattern, we'll probably
move them to a new `ide_diagnostics` crate.
Not that we intentionally want to test all diagnostics on this layer,
despite the fact that they are generally emitted in the guts on the
compiler. Diagnostics care to much about the end presentation
details/fixes to be worth-while "unit" testing. So, we'll unit-test only
the primary output of compilation process (types and name res tables),
and will use integrated UI tests for diagnostics.
2021-06-13 14:55:45 +03:00
Aleksey Kladov
0eafc88079
minor: put a mark back
2021-06-13 11:49:32 +03:00
Maan2003
5ac6804bb3
cargo fmt
2021-06-13 09:48:15 +05:30
Maan2003
c50b4579ec
clippy::useless_return
2021-06-13 09:35:29 +05:30
Maan2003
75370312fb
clippy::redundant_closure
2021-06-13 09:29:36 +05:30
Maan2003
705f7e6e26
clippy::clone_on_copy
2021-06-13 09:27:19 +05:30
Maan2003
c9b4ac5be4
clippy::redudant_borrow
2021-06-13 09:24:16 +05:30