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
Laurențiu Nicola
6bbd106c70
Merge commit '9d8889cdfcc3aa0302353fc988ed21ff9bc9925c' into sync-from-ra
2024-01-15 11:40:09 +02: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
Laurențiu Nicola
3afeb24198
Merge commit 'af40101841c45aa75b56f4e9ca745369da8fb4ba' into sync-from-ra
2024-01-08 11:29:25 +02:00
Matthias Krüger
3fb2cd2002
autofix remaining perf findings
2024-01-07 01:20:20 +01:00
Matthias Krüger
196650dfaf
don't to_string() format args
2024-01-07 01:11:57 +01:00
Matthias Krüger
b22bd36f6e
remove more redundant clones manually
2024-01-07 00:26:49 +01:00
Matthias Krüger
476e10e961
remove redundant clones
2024-01-07 00:17:48 +01:00
bors
f595e60b6d
Auto merge of #16290 - Veykril:chalk, r=Veykril
...
internal: Reduce vec cloning in mir lowering/eval
2024-01-06 22:13:09 +00:00
bors
e9ae0b7ab4
Auto merge of #16285 - lnicola:repr-packed-unaligned, r=Veykril
...
fix: Fix panic on unaligned packed attribute
Closes #16284
2024-01-06 20:35:56 +00:00
Lukas Wirth
5ac0c14384
Remove some vec clones in const-eval
2024-01-06 21:33:47 +01:00
Laurențiu Nicola
d17156a774
Add some repr(packed) tests
2024-01-06 21:24:01 +02:00
Lukas Wirth
5125063a21
Remove unnecessary cloning
2024-01-06 17:48:07 +01:00
Lukas Wirth
c9c4053eed
More aliases
2024-01-06 16:58:15 +01:00
Lukas Wirth
963568b46f
feat: IDE features for primitive tuple fields
2024-01-06 15:04:58 +01:00
bors
3fe6ff74cf
Auto merge of #16085 - Austaras:master, r=Veykril
...
fix: try obligation of `IndexMut` when infer
Closes #15842 .
This issue arises because `K` is ambiguous if only inferred from `Index` trait, but is unique if inferred from `IndexMut`, but r-a doesn't use this info.
2024-01-03 14:18:13 +00:00
Laurențiu Nicola
932d85b529
Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2
2024-01-03 11:35:07 +02:00
bors
426d2842c1
Auto merge of #16222 - rosefromthedead:unresolved-assoc-item, r=Veykril
...
add unresolved-assoc-item assist
I tried to copy from private-assoc-item for this
2024-01-02 15:06:13 +00:00
bors
86e559bf3f
Auto merge of #16211 - tetsuharuohzeki:update-lint, r=Veykril
...
Use Cargo's [workspace.lints.*] to config clippy
This change begin to use [`[workspace.lints.*]`](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table ) that is stabilized since [Rust 1.74](https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html ).
By this change, we make the configure more readable and simplify `xargo lint` more.
2024-01-02 14:53:22 +00:00
Young-Flash
69410bb488
feat: add assoc func quickfix for unresolved_method
diagnostic
2024-01-02 20:53:41 +08:00
Rose Hudson
5878651e7e
add unresolved-assoc-item diagnostic
2023-12-31 17:36:40 +00:00
austaras
1b7968a2cb
fix: try obligation of IndexMut
when infer
2023-12-31 07:19:16 +08:00
Tetsuharu Ohzeki
efc87092b3
Use Cargo's [workspace.lints.*] to config clippy
2023-12-29 23:51:32 +09:00
bors
337e2abb67
Auto merge of #16167 - Veykril:dummy-spans, r=Veykril
...
fix: Fully remove dummy spans
Fixes https://github.com/rust-lang/rust-analyzer/issues/16008
Some of these spans are certainly wrong, but since we discard invisible delimiters currently it doesn't really matter.
2023-12-20 13:33:36 +00:00
Lukas Wirth
4ec81230db
Remove usages of Span::DUMMY
2023-12-20 12:53:46 +01:00
bors
f6635211ce
Auto merge of #16152 - Austaras:alias, r=Veykril
...
fix: resolve alias before resolve variant
Closes #15943 (again)
2023-12-18 15:08:36 +00:00
austaras
bd61888b8d
fix: resolve alias before resolve variant
2023-12-18 22:31:58 +08:00
Lukas Wirth
f49a2fed3f
internal: Move out WithFixture
into dev-dep only crate
2023-12-18 15:24:08 +01:00
Lukas Wirth
35620306a6
internal: Move proc-macro knowledge out of base-db
2023-12-18 12:37:18 +01:00
Laurențiu Nicola
e37cf75791
Merge commit '21b06c1beb9bb59369ffd652f5d617bcf6952e05' into sync-from-ra
2023-12-18 09:21:55 +02:00
bors
21b06c1beb
Auto merge of #16131 - HKalbasi:rustc-tests-fixup, r=HKalbasi
...
Fix false positive type mismatch in const reference patterns
2023-12-15 15:42:00 +00:00
hkalbasi
4f722165b6
Fix false positive type mismatch in const reference patterns
2023-12-15 19:09:07 +03:30
Lukas Wirth
9083017c9d
Remove ModuleId
from TypeOwnerId
2023-12-14 14:11:57 +01:00
Laurențiu Nicola
f532576ac5
Merge commit '457b966b171b09a7e57acb710fbca29a4b3526f0' into sync-from-ra
2023-12-11 11:16:01 +02:00
Lukas Wirth
35fbc0210c
Fallback to method resolution on unresolved field access with matching method name
2023-12-08 16:36:41 +01:00