Commit Graph

83 Commits

Author SHA1 Message Date
Lukas Wirth
070cd4e8b0 minor: Add messages to some asserts for better debugging 2023-12-14 10:24:41 +01:00
Lukas Wirth
45d81048c9 internal: Bump salsa 2023-12-07 10:57:51 +01:00
Lukas Wirth
9cb13b6efb Allow navigation targets to be duplicated when the focus range lies in the macro definition site 2023-12-06 12:38:19 +01:00
Igor Matuszewski
a7224c998d Don't explicitly warn against semicolon_in_expressions_from_macros
This has been warn-by-default for two years now and has already been
added to the future-incompat lints in 1.68.
2023-12-05 11:35:09 +01:00
Lukas Wirth
02a3a9438a Some more minor cleanups 2023-12-02 17:04:13 +01:00
Lukas Wirth
d2a31acda1 Fix macro expansion expression parenthesis wrapping 2023-12-02 13:03:46 +01:00
Lukas Wirth
f48fa0c6cb Re-implement syntax fixups 2023-11-29 16:00:39 +01:00
Lukas Wirth
7a8c4c001b Turn macro_expand from query to normal function 2023-11-28 17:23:51 +01:00
Lukas Wirth
b98597f06d Re-enable proc-macros 2023-11-28 16:28:56 +01:00
Lukas Wirth
98cfdde8ba Thinner TokenMap 2023-11-28 10:56:25 +01:00
Lukas Wirth
6208960c48 Deduplicate dummy test span maps 2023-11-28 10:55:40 +01:00
Lukas Wirth
c43078f99d Re-implement InFile wrappers as type aliases over generic InFileWrapper 2023-11-28 10:55:40 +01:00
Lukas Wirth
30093a6d81 spans always come from real file 2023-11-28 10:55:39 +01:00
Lukas Wirth
394d11b0fa Fix float-split hack not setting up spans correctly 2023-11-28 10:55:39 +01:00
Lukas Wirth
05f375eae2 hygiene 2.0 2023-11-28 10:55:39 +01:00
Lukas Wirth
e36b3f7b8c Proper span representation with syntax context 2023-11-28 10:55:39 +01:00
Lukas Wirth
890eb17b4e Replace ID based TokenMap with proper relative text-ranges / spans 2023-11-28 10:55:39 +01:00
Laurențiu Nicola
3ccde009cb Switch to our own salsa fork 2023-11-26 13:06:36 +02:00
Ali Bektas
736994f026 Make test cases simpler 2023-11-23 11:52:22 +01:00
Ali Bektas
f79e8182c1 v3 2023-11-23 02:15:47 +01:00
Ali Bektas
74d8fdc8fe Update test data for crate deduping
Make data reflect a case where dev deps are existent.
base-db::CrateGraph::extend now adds dev dependencies for a crate
in case of its upgrading from a CrateOrigin::Lib kind of a crate to a
CrateOrigin::Local one.
2023-11-23 02:15:47 +01:00
Ali Bektas
25e990d753 v3 2023-11-23 02:15:47 +01:00
Ali Bektas
7e4aad5ba5 v2 2023-11-23 02:15:47 +01:00
Ali Bektas
886eaa0a7d Relaxation for crate graph mergin
Partially fixes #15656 . When a crate graph is extended which is the case when new workspaces are added to the project
the rules for deduplication were too strict. One problem that arises from this is that in certain conditions
when we see the same crate having different `CrateOrigin`s the first form would be maintained. This approach however
results in some unwanted results such as making renaming forbidden as this has been recently only made available for
local crates. The given example in #15656 can still not be resolved with this PR as that involves taking inconsistencies
between dependencies into consideration. This will be addressed in a future PR.
2023-11-23 02:15:46 +01:00
roife
13249b7dd9 fix: correct a typo in a comment in base-db/lib.rs 2023-11-07 14:51:34 +08:00
DaniPopes
588c7d9182
minor: hover_simple refactor 2023-09-24 22:47:29 +02:00
Lukas Wirth
853f8a21f7 Fix cfg completions not working 2023-09-08 10:49:15 +02:00
hkalbasi
9b636e2326 Support libc::getenv in mir interpreter 2023-08-06 01:46:29 +03:30
hkalbasi
5208bf8f55 implement type_name intrinsic 2023-07-14 16:52:36 +03:30
hkalbasi
3a1054fc1c Replace x with it 2023-07-06 17:33:17 +03:30
Ryo Yoshida
d51536c242
Add library fixture meta
Additionally documents the syntax for fixture meta.
2023-06-28 22:34:14 +09:00
David Lattimore
bea3a33d84 Change in-tree libs to workspace dependencies 2023-06-20 13:53:39 +10:00
Lukas Wirth
abe249559d internal: Give ConstBlockId and InTypeConstId named Location types 2023-06-12 18:21:17 +02:00
hkalbasi
a481e004b0 Lower const params with a bad id 2023-06-11 00:39:28 +03:30
Lukas Wirth
8bc826dd53 Add diagnostic for _ expressions (typed holes) 2023-05-28 14:55:28 +02:00
Lukas Wirth
9419fcb109 fix: Fix body lowering not using block def maps 2023-05-04 20:46:05 +02:00
Laurențiu Nicola
7197a27028 Use triomphe Arc 2023-05-02 20:02:43 +03:00
hkalbasi
6312fbf521 MIR episode 4 2023-05-01 23:23:10 +03:30
Lukas Wirth
968850d7bf Deduplicate crates when extending crate graphs 2023-04-26 11:44:11 +02:00
Lukas Wirth
10d7d7304b
Revert "Handle dev-dependency cycles" 2023-04-25 14:29:26 +02:00
Lukas Wirth
e205af259d Prefer test duped crates for ide features 2023-04-25 11:39:58 +02:00
Lukas Wirth
a4c7a87755 Handle dev-dependency cycles 2023-04-25 10:57:25 +02:00
bors
5750d81e30 Auto merge of #14632 - Veykril:lru-macro, r=lnicola
internal: Increase LRU cache size for parse_expansion and macro_expand queries
2023-04-22 11:13:35 +00:00
Lukas Wirth
6253fc031b Increase LRU cache size for parse_expansion and macro_expand queries 2023-04-22 11:28:56 +02:00
bors
1379b5fac7 Auto merge of #14630 - Veykril:arc, r=Veykril
internal: `Arc<String>` -> `Arc<str>`
2023-04-22 07:58:13 +00:00
Lukas Wirth
f00dcf9a69 internal: Arc<String> -> Arc<str> 2023-04-22 09:48:37 +02:00
bors
0289dfa261 Auto merge of #14599 - HKalbasi:dev2, r=HKalbasi
Detect sysroot dependencies using symlink copy

cc #7637

It is currently in a proof of concept stage, and it doesn't generates a copy. You need to provide your own sysroot copy in `/tmp/ra-sysroot-hack` in a way that `/tmp/ra-sysroot-hack/library/std/lib.rs` exists and `/tmp/ra-sysroot-hack/Cargo.toml` is [the one from this comment](https://github.com/rust-lang/rust-analyzer/issues/7637#issuecomment-1495008329). I will add the symlink code if we decide that this approach is not a dead end.

It seems to somehow work on my system. Go to definition into std dependencies works, type checking can look through fields if I make them public and `cfg_if` appears to work (I tested it by hovering both sides and seeing that the correct one is enabled). Though finding layout of `HashMap` didn't work.

Please try it and let me know if I should go forward in this direction or not.
2023-04-20 22:26:17 +00:00
hkalbasi
39715ce26f Add RA_UNSTABLE_SYSROOT_HACK 2023-04-20 22:55:39 +03:30
Ryo Yoshida
4db87f9346
Fix release channel detection
See bootstrap code in rust-lang/rust for versioning details: e49122fb1c/src/bootstrap/lib.rs (L1244)
2023-04-18 02:12:17 +09:00
Ryo Yoshida
584d2697cc
Add toolchain meta for tests 2023-04-11 21:21:10 +09:00