Commit Graph

254 Commits

Author SHA1 Message Date
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
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
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
Johann Hemmann
df2c7a6e4e cargo clippy --fix 2024-01-31 19:06:36 +01:00
Johann Hemmann
0adb4d1685 wildcard_in_or_patterns 2024-01-31 19:06:18 +01:00
Johann Hemmann
e7d0deac53 unnecessary_mut_passed 2024-01-31 19:06:18 +01: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
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
Johann Hemmann
43b1ae0446 cargo clippy --fix 2024-01-30 14:50:21 +01:00
Young-Flash
db9fd370ee minor: correct typos 2024-01-30 21:43:43 +08:00
Lukas Wirth
5860763f18 Cleanup error variants in MIR code slightly 2024-01-30 09:53:39 +01:00
Lukas Wirth
8a5829cf28 Re-order mod declarations 2024-01-27 11:02:34 +01:00
Nadrieril
2370b70f25 Replace local copy of exhaustiveness checking with upstream librarified version 2024-01-23 15:54:00 +01:00
r0cky
1a9ef233b7 Remove unused codes 2024-01-21 12:56:23 +08:00
Johann Hemmann
b1a0c9ac40 single_match 2024-01-19 18:31:15 +01:00
Johann Hemmann
9dd07f0bc4 should_implement_trait 2024-01-19 17:53:09 +01:00
Johann Hemmann
71d4dba960 redundant_pattern_matching 2024-01-19 17:31:01 +01:00
Johann Hemmann
6738edc259 ptr_arg 2024-01-19 17:31:01 +01:00
Johann Hemmann
d351cb8dfb match_single_binding 2024-01-19 17:31:01 +01:00
Johann Hemmann
add40c8660 match_like_matches_macro 2024-01-19 17:31:01 +01:00
Johann Hemmann
9e4f94c938 no_effect 2024-01-19 17:31:01 +01:00
Johann Hemmann
2a500d5280 for_kv_map 2024-01-19 17:31:00 +01:00
Johann Hemmann
882289b229 double_parens 2024-01-19 17:31:00 +01:00
Johann Hemmann
4184c6af0d collapsible_match 2024-01-19 17:31:00 +01:00
Johann Hemmann
b5eca5f2fc collapsible_if 2024-01-19 17:31:00 +01:00
Lukas Wirth
46e38318a2 Stub out FnAbi::partial_eq as a workaround for now 2024-01-19 15:15:23 +01:00
Lukas Wirth
3a722bdf2e feat:Record FnAbi 2024-01-19 15:15:23 +01:00
Johann Hemmann
255cde788b Fix CI 3 2024-01-18 14:22:20 +01:00
Johann Hemmann
fad4fa163c cargo clippy --fix 2024-01-18 13:59:49 +01:00
Lukas Wirth
8f4f5a6cce fix: Make value_ty query fallible 2024-01-16 12:09:40 +01:00
bors
5df53c9612 Auto merge of #16351 - Veykril:eager-enum-variant, r=Veykril
internal: Eagerly lower enum variants in CrateDefMap construction
2024-01-16 08:39:13 +00:00
Moritz Hedtke
fe35447617 fix: rename generator to coroutine also in dependencies
Follow the rename in nightly (see https://blog.rust-lang.org/inside-rust/2023/10/23/coroutines.html)
2024-01-15 12:24:48 +01:00
Moritz Hedtke
f937673ce2 fix: rename generator to coroutine
Follow the rename in nightly (see https://blog.rust-lang.org/inside-rust/2023/10/23/coroutines.html)
2024-01-15 12:24:47 +01:00
Lukas Wirth
180e9b2bbf Cleanup 2024-01-15 12:22:51 +01:00
Lukas Wirth
1669344b2a Thinner DefDiagnostics 2024-01-15 11:07:26 +01:00
Lukas Wirth
d80d2fcae0 Eagerly lower enum variants in CrateDefMap construction 2024-01-15 10:24:14 +01:00
Lukas Wirth
b6e6d5d3af internal: Consider all kinds of explicit private imports in find_path 2024-01-11 12:22:04 +01:00
bors
d5366b5c19 Auto merge of #16265 - Patryk27:suggest-pub-crate-imports, r=Veykril
fix: Acknowledge `pub(crate)` imports in import suggestions

rust-analyzer has logic that discounts suggesting `use`s for private imports, but that logic is unnecessarily strict - for instance given this code:

```rust
mod foo {
    pub struct Foo;
}

pub(crate) use self::foo::*;

mod bar {
    fn main() {
        Foo$0;
    }
}
```

... RA will suggest to add `use crate::foo::Foo;`, which not only makes the code overly verbose (especially in larger code bases), but also is disjoint with what rustc itself suggests.

This commit adjusts the logic, so that `pub(crate)` imports are taken into account when generating the suggestions; considering rustc's behavior, I think this change doesn't warrant any extra configuration flag.

Note that this is my first commit to RA, so I guess the approach taken here might be suboptimal - certainly feels somewhat hacky, maybe there's some better way of finding out the optimal import path 😅
2024-01-11 09:54:22 +00:00
Patryk Wychowaniec
76aaf17794
Suggest pub(crate) imports
rust-analyzer has logic that discounts suggesting `use`s for private
imports, but that logic is unnecessarily strict - for instance given
this code:

```rust
mod foo {
    pub struct Foo;
}

pub(crate) use self::foo::*;

mod bar {
    fn main() {
        Foo$0;
    }
}
```

... RA will suggest to add `use crate::foo::Foo;`, which not only makes
the code overly verbose (especially in larger code bases), but also is
disjoint with what rustc itself suggests.

This commit adjusts the logic, so that `pub(crate)` imports are taken
into account when generating the suggestions; considering rustc's
behavior, I think this change doesn't warrant any extra configuration
flag.

Note that this is my first commit to RA, so I guess the approach taken
here might be suboptimal - certainly feels somewhat hacky, maybe there's
some better way of finding out the optimal import path 😅
2024-01-10 18:21:16 +01:00
Lukas Wirth
4d3a0dc329 Replace SourceRootCrates hashset output with slice for deterministic order 2024-01-10 14:51:51 +01:00
Lukas Wirth
c4b3075be0 Don't allocate inherent_impls_in_block and trait_impls_in_block if its empty 2024-01-09 21:20:03 +01:00
Lukas Wirth
06aaf20f10 Some minor perf improvements 2024-01-09 20:43:17 +01:00
bors
25f71469f1 Auto merge of #16311 - Veykril:rustc-deps, r=Veykril
internal: Remove `rustc_dependencies ` crate

The crate serves no purpose really
2024-01-09 09:37:48 +00:00
Laurențiu Nicola
b0b2b1c5f1 Fix allow(dead_code) 2024-01-09 10:00:57 +02:00
Lukas Wirth
f972da70d4 Remove rustc_dependencies crate 2024-01-08 15:39:35 +01:00
Lukas Wirth
7dd9f20ce3 Builtin derives are hygienic 2024-01-08 12:50:11 +01:00