Ryo Yoshida
5db0e1a346
Restructure ImportMap
collection
2023-07-01 00:18:23 +09:00
Ryo Yoshida
2b106648a7
Only store item name instead of full path
2023-07-01 00:17:57 +09:00
Ryo Yoshida
860628af7c
Remove SearchMode:Contains
...
Also micro-optimizes fuzzy search.
2023-06-30 23:37:23 +09:00
Ryo Yoshida
8cd4e9f7ec
Merge assoc_items_only
and exclude_import_kinds
into assoc_mode
2023-06-30 23:37:10 +09:00
Ryo Yoshida
97b725e269
Remove name_only
from import map query
2023-06-30 23:35:55 +09:00
hkalbasi
f53f9230f0
Support #[derive_const(Trait)]
2023-06-29 20:58:35 +03:30
bors
ad434fc4ac
Auto merge of #15157 - HKalbasi:tokio-test, r=HKalbasi
...
Fix runnable detection for `#[tokio::test]`
fix #15141
It is hacky, and it wouldn't work for e.g. this case:
```Rust
use ::core::prelude;
#[prelude::v1::test]
fn foo() {
}
```
But it works for the tokio case. We should use the name resolution here somehow, and after that we should probably also get rid of the ast based `test_related_attribute` function.
2023-06-28 20:02:00 +00:00
hkalbasi
7901538dc8
Fix runnable detection for #[tokio::test]
2023-06-28 23:31:08 +03:30
Ryo Yoshida
56dd5368f5
Refactor
...
- don't take `&self` as receiver for `Copy` types
- simplify `hir::Module::nearest_non_block_module()`
- style changes for consistency
2023-06-27 16:01:07 +09:00
Ryo Yoshida
a02846343f
Fix self
and super
path resolution in block modules
2023-06-27 15:29:08 +09:00
Josh Stone
380773b3e8
Upgrade to indexmap v2
2023-06-24 17:35:20 -07:00
hkalbasi
674cd5ab57
Add run-tests command
2023-06-22 19:33:37 +03:30
Lukas Wirth
8823db6c78
Bump more deps
2023-06-22 11:44:10 +02:00
bors
bc26e81cd5
Auto merge of #15070 - Veykril:analysis-stat-stuff, r=Veykril
...
internal: Report metric timings for file item trees and crate def map creation
2023-06-21 05:58:13 +00:00
David Lattimore
bea3a33d84
Change in-tree libs to workspace dependencies
2023-06-20 13:53:39 +10:00
hkalbasi
3c87825074
Use ArgumentV1
instead of Argument
2023-06-19 22:48:49 +03:30
Lukas Wirth
9476fdaaa9
HIR ExternCrateDecl
2023-06-19 14:15:08 +02:00
Lukas Wirth
0bde3fc77e
Intern use and extern crate items like other items
2023-06-19 13:51:44 +02:00
Lukas Wirth
c3186202a2
Shrink size of hir::Binding
2023-06-18 12:03:04 +02:00
Lukas Wirth
83d7724629
fix: Add binding definition for for-expr iterator desugared binding
2023-06-18 11:44:01 +02:00
Lukas Wirth
58ac823864
Less eager parsing for module sources
2023-06-17 10:58:52 +02:00
Lukas Wirth
3484b5a116
internal: Do not allocate unnecessarily when importing macros from parent modules
2023-06-16 18:41:06 +02:00
bors
9c967d3809
Auto merge of #15053 - Veykril:crate-root-module-id, r=Veykril
...
internal: Add a CrateRootModuleId that encodes a module id that is always a crate root
2023-06-14 14:41:06 +00:00
Lukas Wirth
cf178cba8f
internal: Add a CrateRootModuleId that encodes a module id that is always a crate root
2023-06-14 15:41:06 +02:00
bors
07bc6cbcad
Auto merge of #15040 - lnicola:hash-state-name, r=Veykril
...
fix: Use a more obscure hasher name in derive expansion
Closes #15039
2023-06-13 06:13:35 +00:00
Laurențiu Nicola
0b441ca6a5
Use a more obscure hasher name in derive expansion
2023-06-13 08:50:27 +03:00
Lukas Wirth
abe249559d
internal: Give ConstBlockId and InTypeConstId named Location types
2023-06-12 18:21:17 +02:00
hkalbasi
a4695788ca
Add a bunch of fixme comments
2023-06-12 00:37:11 +03:30
hkalbasi
e83b56739f
Flatten the TypeOwnerId
2023-06-11 01:36:32 +03:30
hkalbasi
f8594f78bb
Use ConstArg
instead of Expr
for AstId
of InTypeConstId
2023-06-11 00:39:28 +03:30
hkalbasi
d9136df9e5
Handle return types for in type const bodies
2023-06-11 00:39:28 +03:30
hkalbasi
a481e004b0
Lower const params with a bad id
2023-06-11 00:39:28 +03:30
Lukas Wirth
b6fb35f20c
Shrink hir_expand::attr::AttrInput by boxing a variant
2023-06-10 01:21:52 +02:00
Lukas Wirth
a02b9b279e
internal: Lazy eager macros
2023-06-09 13:02:13 +02:00
hkalbasi
30e16e20d0
Fix unwrap on None in expanding format args
2023-06-08 00:17:22 +03:30
Ryo Yoshida
4f0c6fac17
fix: only generate trait bound for associated types in field types
2023-06-07 20:52:49 +09:00
Laurențiu Nicola
c3dbe7c717
Merge remote-tracking branch 'upstream/master' into sync-from-rust
2023-06-05 11:07:47 +03:00
bors
9d5c34a80e
Auto merge of #14970 - HKalbasi:mir-fix, r=HKalbasi
...
Detect "bound more than once" error and suppress `need-mut` for it.
Fix the `need-mut` false positive for `izip!`
2023-06-04 09:33:53 +00:00
hkalbasi
71f3e4b08c
Detect "bound more than once" error and suppress need-mut
for it.
2023-06-04 12:39:36 +03:30
Lukas Wirth
f9a9e40c0a
Update builtin attribute list
2023-06-04 10:02:11 +02:00
bors
0b4c09b1d2
Auto merge of #14941 - Veykril:def-map, r=Veykril
...
Shrink `DefMap`, share crate level items with block def maps
2023-06-01 16:42:12 +00:00
Lukas Wirth
11b937177b
Skip extern prelude path resolution in block def maps
2023-06-01 17:58:08 +02:00
bors
4458e7f190
Auto merge of #14942 - HKalbasi:for-loop-label, r=HKalbasi
...
fix bug in labeled for loop desugaring
fix https://github.com/rust-lang/rust-analyzer/pull/14892#discussion_r1213091393
2023-06-01 14:54:47 +00:00
hkalbasi
f4c52b40bd
fix bug in labeled for loop desugaring
2023-06-01 17:51:53 +03:30
Lukas Wirth
54e3ef658a
Rename nameres::CrateData to DefMapCrateData
2023-06-01 15:50:19 +02:00
Lukas Wirth
1e6406e223
Move extern prelude into CrateData
2023-06-01 15:49:05 +02:00
Lukas Wirth
bdca349573
Arc DefMap::data so the block def maps can share it
2023-06-01 15:27:05 +02:00
Lukas Wirth
5c466ccc2b
Refactor out some crate wide data in DefMap into nested struct
2023-06-01 15:04:38 +02:00
Lukas Wirth
dc7c6d43c7
Slightly shrink DefMap
2023-06-01 14:46:36 +02:00
Lukas Wirth
0e28202832
Insert missing expr/pat for leading comma tuples
2023-06-01 08:56:40 +02:00