davidsemakula
0ffc088439
no incorrect case diagnostics for trait impl assoc functions and consts except for pats in fn bodies
2024-02-02 17:07:08 +03:00
davidsemakula
6d2d6323ac
incorrect case diagnostics for trait assoc functions and consts
2024-02-02 17:07:08 +03:00
davidsemakula
5fe3b75677
incorrect case diagnostics for trait name
2024-02-02 17:07:08 +03:00
bors
8f6a72871e
Auto merge of #16469 - Young-Flash:ci_typos, r=lnicola
...
internal: add typos check CI (part 2)
follow up https://github.com/rust-lang/rust-analyzer/pull/16448
2024-02-02 12:02:48 +00:00
Young-Flash
ba2910a3a7
minor: correct some typos
2024-02-02 18:22:54 +08:00
Laurențiu Nicola
4f09335063
Merge remote-tracking branch 'upstream/master' into sync-from-rust
2024-02-02 08:40:28 +02:00
bors
850ba2fb63
Auto merge of #16451 - Urhengulas:satisfy-clippy, r=Veykril
...
internal: Work through temporarily allowed clippy lints, part 2
Another follow-up to https://github.com/rust-lang/rust-analyzer/pull/16401 .
2024-02-01 14:23:18 +00:00
bors
42cb1a2bd7
Auto merge of #16465 - Veykril:eprintln, r=Veykril
...
minor: Remove `stdx::eprintln` overwrite
2024-01-31 21:07:50 +00:00
Lukas Wirth
23f4b7f45f
Remove stdx::eprintln overwrite
2024-01-31 22:06:05 +01:00
clubby789
a1fdb876c3
Remove abi_amdgpu_kernel
references
2024-01-31 19:06:10 +00:00
bors
039681112f
Auto merge of #16456 - davidbarsky:david/tracing-followups, r=Veykril
...
internal: `tracing` improvements and followups
Hi folks! Building on https://github.com/rust-lang/rust-analyzer/pull/16394 , I've got a few small tweaks:
- Removed the accidental `mod.rs` usage that I introduced.
- Removed a panic in `pat_analysis.rs`.
- Recorded the event kind in `handle_event` to better distinguish what _kind_ of event is being handled.
- Did a small refactor of `hprof` to have somewhat more linear control flow, and more importantly, write the recorded fields to the output.
The end result is the following:
<img width="1530" alt="A screenshot of Visual Studio Code on a Mac. `hprof.rs` is open, with " src="https://github.com/rust-lang/rust-analyzer/assets/2067774/bd11dde5-b2da-4774-bc38-bcb4772d1192 ">
2024-01-31 18:29:51 +00:00
David Barsky
44494e235a
internal: teach hprof to record tracing
fields
2024-01-31 13:15:47 -05:00
Johann Hemmann
df2c7a6e4e
cargo clippy --fix
2024-01-31 19:06:36 +01:00
Johann Hemmann
771c6c9271
format_collect
2024-01-31 19:06:36 +01:00
Johann Hemmann
d37f4e0d21
new_without_default
2024-01-31 19:06:36 +01:00
Johann Hemmann
e7e09e7750
large_enum_variant
2024-01-31 19:06:35 +01:00
Johann Hemmann
04ccef80cb
field_reassign_with_default
2024-01-31 19:06:18 +01:00
Johann Hemmann
dd9f27b8d3
borrow_deref_ref
2024-01-31 19:06:18 +01:00
Johann Hemmann
c4688343de
derivable_impls
2024-01-31 19:06:18 +01:00
Johann Hemmann
0adb4d1685
wildcard_in_or_patterns
2024-01-31 19:06:18 +01:00
Johann Hemmann
b176cf2478
useless_format
2024-01-31 19:06:18 +01:00
Johann Hemmann
b73ee2f50d
useless_conversion
2024-01-31 19:06:18 +01:00
Johann Hemmann
e7d0deac53
unnecessary_mut_passed
2024-01-31 19:06:18 +01:00
Johann Hemmann
f191b80799
Refactor
2024-01-31 19:06:18 +01:00
Johann Hemmann
c4302eaa56
unnecessary_lazy_evaluations
2024-01-31 19:06:18 +01:00
Johann Hemmann
f15ee8a380
unnecessary_filter_map
2024-01-31 19:06:18 +01:00
Johann Hemmann
de6f9561f2
unnecessary_cast
2024-01-31 19:06:18 +01:00
Johann Hemmann
daa20725c5
toplevel_ref_arg
2024-01-31 19:06:18 +01:00
Johann Hemmann
386d438e17
skip_while_next
2024-01-31 19:06:18 +01:00
David Barsky
579e98c4c5
internal: record Event kind in handle_event
2024-01-31 13:00:40 -05:00
David Barsky
251b14f2c5
internal: don't panic in debug_pat
2024-01-31 13:00:30 -05:00
bors
355c9444e1
Auto merge of #16448 - Young-Flash:typos, r=lnicola
...
minor: correct typos
I use [crate-ci/typos](https://github.com/crate-ci/typos ) to check typos in codebase, if it's ok with you, I'd like to add a typo check CI using [typos](https://github.com/crate-ci/typos ) (with Apache-2.0, MIT licenses).
BTW, we can add a [_typos.toml](https://github.com/crate-ci/typos/blob/master/docs/reference.md ) as white list for some intentional typos
2024-01-31 13:29:55 +00:00
Young-Flash
62ff8f33d4
minor: correct close
to closure
2024-01-31 21:26:30 +08:00
bors
9d837a622d
Auto merge of #16445 - lnicola:bump-scip, r=lnicola
...
internal: Bump scip
Fixes #16440
2024-01-31 09:27:01 +00:00
bors
2661c272c9
Auto merge of #16461 - Veykril:expansion-info, r=Veykril
...
internal: Remove unnecessary usages of ExpansionInfo
And some follow up simplifications to https://github.com/rust-lang/rust-analyzer/pull/16439
2024-01-31 08:58:55 +00:00
Lukas Wirth
d252247ab7
internal: Remove unnecessary usages of ExpansionInfo
2024-01-31 09:57:17 +01:00
bors
e48bc04eaf
Auto merge of #16459 - Veykril:diagnostics, r=Veykril
...
internal: Use improved adjusted_display_range for all diagnostics
2024-01-31 08:17:53 +00:00
Lukas Wirth
604479c373
internal: Use improved adjusted_display_range for all diagnostics
2024-01-31 09:16:30 +01:00
bors
e4146af294
Auto merge of #16441 - Young-Flash:exclude_tests_refs, r=Veykril
...
feat: enable excluding refs search results in test
## Change
Here I introduce a new `ReferenceCategory::Test` type to indicate whether the function where this reference is located is marked as `#[test]`, and expose an config item (`rust-analyzer.references.excludeTests`) to client.
I also changed the signature of `ReferenceCategory::new`, adding a `sema: &Semantics<'_, RootDatabase>` param to do some hir analysis. Hope the current implementation is good to go.
## Demo
`"rust-analyzer.references.excludeTests": false`
![include](https://github.com/rust-lang/rust-analyzer/assets/71162630/9f1176d4-7b41-4f49-ac79-55d25a42d5d1 )
`"rust-analyzer.references.excludeTests": true`
![exclude](https://github.com/rust-lang/rust-analyzer/assets/71162630/2938b44b-9e5b-48de-a049-453f5bbc09d0 )
close https://github.com/rust-lang/rust-analyzer/issues/14530
2024-01-31 07:53:28 +00:00
David Barsky
17d2e8d910
internal: remove tracing/mod.rs
2024-01-30 13:37:27 -05:00
David Barsky
e1ea7c8844
internal: switch to tracing
from log
...
This commit also adds `tracing` to NotificationDispatcher/RequestDispatcher,
bumps `rust-analyzer-salsa` to 0.17.0-pre.6, `always-assert` to 0.2, and
removes the homegrown `hprof` implementation in favor of a vendored
tracing-span-tree.
2024-01-30 12:27:31 -05:00
bors
63123ab408
Auto merge of #16417 - davidsemakula:normalize-use-trees, r=Veykril
...
feat: "Normalize import" assist and utilities for normalizing use trees
- Add import/use tree normalization utilities
- Add "normalize import" assist
- Update "merge imports" assist to always apply to the covering use item except for nested use tree selections
- Update "merge imports" assist to avoid adding unnecessary braces when merging nested use tree selections
See [this discussion](https://github.com/rust-lang/rust-analyzer/pull/16372#discussion_r1457244321 ) for the motivation for the new "normalize import" assist and changes to the "merge imports" assist.
2024-01-30 14:55:08 +00:00
Johann Hemmann
43b1ae0446
cargo clippy --fix
2024-01-30 14:50:21 +01:00
Johann Hemmann
75a42f1a09
collapsible_if
2024-01-30 14:44:44 +01:00
Young-Flash
db9fd370ee
minor: correct typos
2024-01-30 21:43:43 +08:00
davidsemakula
dba3fc4425
style: remove unnecessary macro
2024-01-30 16:15:15 +03:00
bors
11b401d0b4
Auto merge of #16447 - Veykril:mir-errors, r=Veykril
...
intenral: Cleanup error variants in MIR code a bit
2024-01-30 11:38:41 +00:00
bors
22b6f9679d
Auto merge of #16439 - wasd96040501:feat/gotodef3, r=Veykril
...
feat: Support for GOTO def from *inside* files included with include! macro
close #14937
Try to implement goto def from *inside* files included with include! macro.
This implementation has two limitations:
1. Only **one** file which calls include! will be tracked. (I think multiple file be included is a rare case and we may let it go for now)
2. Mapping token from included file to macro call file (semantics.rs:646~658) works fine but I am not sure is this the correct way to implement.
2024-01-30 11:27:18 +00:00
Lukas Wirth
5860763f18
Cleanup error variants in MIR code slightly
2024-01-30 09:53:39 +01:00
Laurențiu Nicola
20c01672a8
Bump scip
2024-01-30 08:43:17 +02:00