bors
b5e0d7c349
Auto merge of #17398 - Veykril:bogus-file, r=Veykril
...
internal: Remove FileId::BOGUS
2024-06-12 07:19:31 +00:00
Lukas Wirth
8ebabce475
internal: Remove FileId::BOGUS
2024-06-12 08:16:07 +02:00
Young-Flash
6403bdb930
minor: use push_str instead
2024-06-09 22:31:55 +08:00
Young-Flash
e8941dae46
internal: tweak test case
2024-06-09 20:55:40 +08:00
Young-Flash
dcbc76b967
internal: better print style for hir
2024-06-09 12:00:43 +08:00
Wilfred Hughes
27182bb96b
chore: Prefer tracing span shorthand macros
2024-06-06 16:52:25 -07:00
bors
af488c971f
Auto merge of #17352 - roife:fix-issue-17338, r=Veykril
...
fix: do not resolve prelude within block modules
fix #17338 (continuing from #17251 ).
In #17251 , we injected preludes into non-top-level modules, which leading to r-a to directly resolve names in preludes in block modules. This PR fix it by checking whether the module is a pseudo-module introduced by blocks. (similar to what we do for extern preludes)
2024-06-06 09:40:39 +00:00
roife
c330c62aa2
fix: do not resolve prelude within block modules
2024-06-06 16:55:09 +08:00
Lukas Wirth
97b58f2846
Try caching macro calls more aggressively
2024-06-04 15:23:00 +02:00
Lukas Wirth
6f0207d594
Cleanup some inert attribute stuff
2024-06-04 12:38:20 +02:00
Lukas Wirth
f1dbb958c8
Add fuel to find_path
2024-06-03 20:07:00 +02:00
Lukas Wirth
f94d34bd72
Remove an allocation in find_path::find_local_import_locations
2024-06-03 19:57:49 +02:00
Lukas Wirth
48822e0941
Simplify
2024-06-03 19:46:40 +02:00
Lukas Wirth
426d01eab0
Deduplicate
2024-06-03 19:26:11 +02:00
Lukas Wirth
db80216dac
Fix find_path search not reducing scope appropriately for foreign items
2024-06-03 19:21:19 +02:00
Lukas Wirth
60fa981df1
Simplify
2024-06-03 19:06:58 +02:00
Nilstrieb
0e1353bebd
Don't mark #[rustc_deprecated_safe_2024]
functions as unsafe
...
`std::env::set_var` will be unsafe in edition 2024, but not before it.
I couldn't quite figure out how to check for the span properly, so for now
we just turn the false positives into false negatives, which are less bad.
2024-06-02 15:04:26 +02:00
bors
d4da3f925c
Auto merge of #17251 - roife:fix-issue-17057, r=Veykril
...
fix: resolve extern prelude for local mods in block modules
fix https://github.com/rust-lang/rust-analyzer/issues/17057 , https://github.com/rust-lang/rust-analyzer/issues/17032 .
We should use `ModuleOrigin` to check if the current module is a pseudo-module introduced by blocks (where names might be shadowed), rather than checking `block_def_map`.
2024-05-22 20:11:24 +00:00
Lukas Wirth
3a7dcf91c4
Simplify
2024-05-22 21:57:44 +02:00
David Barsky
b75301cec8
internal: refactor prefer_no_std
/prefer_prelude
bools into a struct
2024-05-22 20:46:30 +02:00
roife
d9cc159b26
fix: check pseudo-block by local_id instead of ModuleOrigin
2024-05-23 02:39:53 +08:00
bors
6a16749eb0
Auto merge of #17277 - Veykril:find-path-fixes, r=Veykril
...
fix: Various find path fixes
Fixes https://github.com/rust-lang/rust-analyzer/issues/17271
2024-05-22 18:22:32 +00:00
bors
42a8500ebf
Auto merge of #17279 - Veykril:format_args-escape, r=Veykril
...
fix: Fix format_args lowering passing incorrect parameters to `rustc_parse_format`
2024-05-22 14:12:22 +00:00
Lukas Wirth
4f17d07e69
fix: Fix format_args lowering passing incorrect parameters to rustc_parse_format
2024-05-22 16:11:06 +02:00
bors
daf66ad8eb
Auto merge of #17268 - Veykril:signatures, r=Veykril
...
feat: More callable info
With this PR we retain more info about callables other than functions, allowing for closure parameter type inlay hints to be linkable as well as better signature help around closures and `Fn*` implementors.
2024-05-22 12:48:17 +00:00
Lukas Wirth
ca06b090d7
expectify find_path tests
2024-05-22 14:05:24 +02:00
Lukas Wirth
c88b421853
fix: Fix general find-path inconsistencies
2024-05-22 14:05:24 +02:00
roife
48dc20f80d
test: add tests for extern preludes resolving in local mods
2024-05-21 20:35:55 +08:00
Laurențiu Nicola
49cae17fa2
Merge from rust-lang/rust
2024-05-19 11:20:26 +03:00
Lukas Wirth
cd9e90cc71
Update builtin tool list
2024-05-18 10:52:05 +02:00
roife
55db9530eb
fix: resolve extern prelude for local mods in block modules
2024-05-17 23:29:00 +08:00
bors
77c7886283
Auto merge of #17227 - Veykril:build-deps-changed-hashes, r=Veykril
...
fix: Hash file contents to verify whether file actually changed
Fixes https://github.com/rust-lang/rust-analyzer/issues/16580
2024-05-14 10:48:18 +00:00
Lukas Wirth
1ca97ba896
Hash file contents to verify whether file actually changed
2024-05-14 11:55:12 +02:00
bors
d28111dce8
Auto merge of #17224 - Veykril:lock-bump, r=Veykril
...
Bump Cargo.lock
2024-05-14 08:59:34 +00:00
Lukas Wirth
2a4be8d1f7
Bump Cargo.lock
2024-05-14 10:57:02 +02:00
bors
b98690ba74
Auto merge of #17221 - Veykril:lazier-validation, r=Veykril
...
internal: Lazier macro parse tree validation
2024-05-13 15:16:46 +00:00
Lukas Wirth
56552f4839
Push macro-parsing error calculation out of fundamental queries
2024-05-13 16:56:26 +02:00
Lukas Wirth
a39c0493a1
Render literal escaping errors in hovers
2024-05-13 12:51:57 +02:00
Martin Nordholts
938e1a0e2c
Change SIGPIPE
ui from #[unix_sigpipe = "..."]
to -Zon-broken-pipe=...
...
In the stabilization attempt of `#[unix_sigpipe = "sig_dfl"]`, a concern
was raised related to using a language attribute for the feature: Long
term, we want `fn lang_start()` to be definable by any crate, not just
libstd. Having a special language attribute in that case becomes
awkward.
So as a first step towards towards the next stabilization attempt, this
PR changes the `#[unix_sigpipe = "..."]` attribute to a compiler flag
`-Zon-broken-pipe=...` to remove that concern, since now the language
is not "contaminated" by this feature.
Another point was also raised, namely that the ui should not leak
**how** it does things, but rather what the **end effect** is. The new
flag uses the proposed naming. This is of course something that can be
iterated on further before stabilization.
2024-05-02 19:48:29 +02:00
bors
ecba59d69c
Auto merge of #17175 - Veykril:fix-implicit-ty-args, r=Veykril
...
fix: Fix implicit ty args being lowered where they shouldn't
Fixes https://github.com/rust-lang/rust-analyzer/issues/17173
2024-05-02 10:04:13 +00:00
Lukas Wirth
8241d8a0b8
fix: Fix implicit ty args being lowered where they shouldn't
2024-05-02 11:53:53 +02:00
Lukas Wirth
a268eaf053
fix: Correctly handle no_core
/no_std
for preludes
2024-05-02 10:50:28 +02:00
Lukas Wirth
da0fb75d10
Use RefCell::take
2024-04-30 14:19:56 +02:00
dfireBird
40a677ddf0
implement creating generics for impl traits in associated types
2024-04-29 23:55:02 +05:30
Lukas Wirth
36c1c77cf9
fix: Fix doc comment desugaring for proc-macros
2024-04-27 13:30:51 +02:00
Lukas Wirth
bfe59bbdc8
fix: Fix attributes on generic parameters colliding in item tree
2024-04-27 13:15:36 +02:00
Lukas Wirth
ac389ce2ef
fix: Fix expression scopes not being calculated for inline consts
2024-04-25 09:49:19 +02:00
bors
4c08e2d32f
Auto merge of #16938 - Nilstrieb:dont-panic-tests, r=Veykril
...
Implement `BeginPanic` handling in const eval
for #16935 , needs some figuring out of how to write these tests correctly
2024-04-21 16:22:02 +00:00
Laurențiu Nicola
4c94e69115
Add in-rust-tree feature to hir-expand
2024-04-20 18:44:27 +03:00
roife
a543516ea4
fix: handle escaped chars in doc comments
2024-04-19 14:57:37 +08:00