Ryo Yoshida
3203ea896d
Add macro_use
prelude to DefMap
2023-05-11 21:13:11 +09:00
Ryo Yoshida
96113b7b8e
Remove prelude fallback path for Rust <1.52.0
...
We've already removed non-sysroot proc macro server, which effectively
removed support for Rust <1.64.0, so this removal of fallback path
shouldn't be problem at this point.
2023-05-11 21:13:10 +09:00
Ryo Yoshida
34a9129333
fix: column!()
and line!()
built-in macros return u32
2023-05-11 21:13:05 +09:00
Ryo Yoshida
a0a7860141
Refactor
2023-05-11 18:17:16 +09:00
Arpad Borsos
35940bcda3
Remove identity_future
from stdlib
...
This function/lang_item was introduced in #104321 as a temporary workaround of future lowering.
The usage and need for it went away in #104833 .
After a bootstrap update, the function itself can be removed from `std`.
2023-05-07 10:52:01 +02:00
Alexis (Poliorcetics) Bourget
d7fdf141a4
fix: various clippy lints
2023-05-07 09:43:37 +02:00
Ryo Yoshida
fa2340a4df
Parse associated return type bounds
2023-05-06 20:31:11 +09:00
Ryo Yoshida
d7d8971203
Remove (..)
-style return type notation
2023-05-06 20:30:17 +09:00
bors
0dd94d3b07
Auto merge of #14738 - Veykril:def-map-fix, r=Veykril
...
fix: Fix body lowering not using block def maps
Fixes the issue in the comment here https://github.com/rust-lang/rust-analyzer/issues/10084#issuecomment-1534320254 , not the general issue unfortunately.
2023-05-04 18:47:04 +00:00
Lukas Wirth
9419fcb109
fix: Fix body lowering not using block def maps
2023-05-04 20:46:05 +02:00
hkalbasi
d9f4cbbe8f
Emit function bodies in expanding builtin derives
2023-05-03 14:14:47 +03:30
Laurențiu Nicola
7197a27028
Use triomphe Arc
2023-05-02 20:02:43 +03:00
hkalbasi
3a3c3630a2
fix break-outside-of-loop false positive in try block
2023-05-02 03:11:56 +03:30
hkalbasi
6312fbf521
MIR episode 4
2023-05-01 23:23:10 +03:30
Lukas Wirth
cf8f13b531
fix: Fix restart server button trying to start instead of restart the server
2023-04-28 21:34:31 +02:00
Matthias Krüger
e99a9904aa
Rollup merge of #110766 - m-ou-se:fmt-rt, r=jyn514
...
More core::fmt::rt cleanup.
- Removes the `V1` suffix from the `Argument` and `Flag` types.
- Moves more of the format_args lang items into the `core::fmt::rt` module. (The only remaining lang item in `core::fmt` is `Arguments` itself, which is a public type.)
Part of https://github.com/rust-lang/rust/issues/99012
Follow-up to https://github.com/rust-lang/rust/pull/110616
2023-04-28 07:34:02 +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
Matthias Krüger
6bd8fee558
Revert "Remove #[alloc_error_handler] from the compiler and library"
...
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
2023-04-25 00:08:35 +02:00
bors
707382c21d
Auto merge of #14652 - Veykril:pat2021, r=Veykril
...
fix: Fix pat fragment handling in 2021 edition
Fixes https://github.com/rust-lang/rust-analyzer/issues/9055
The fix isn't that great, but we are kind of forced to do it the quick and hacky way right now since std has changed the `matches` macro to make use of this now. And for a proper fix we need to track hygiene for identifiers which is a long way off anyways
2023-04-24 20:36:45 +00:00
Lukas Wirth
d1ca505525
fix: Fix pat fragment handling in 2021 edition
2023-04-24 22:21:37 +02:00
Mara Bos
429d06b879
Remove "V1" from ArgumentsV1 and FlagsV1.
2023-04-24 16:16:14 +02:00
bors
b2e6f3a9da
Auto merge of #14636 - Veykril:macros, r=Veykril
...
internal: Remove unnecessary is_derive field from MacroCallKind::Attr
2023-04-24 06:13:18 +00:00
hkalbasi
232f293c19
Fix some typos in StructFlags
2023-04-23 21:55:47 +03:30
Lukas Wirth
cebc018e2a
Remove unnecessary is_derive field from MacroCallKind::Attr
2023-04-22 14:29:28 +02:00
bors
442a769f82
Auto merge of #14634 - Veykril:assoc-collect, r=Veykril
...
fix: Report remaining macro errors in assoc item collection
2023-04-22 09:49:57 +00:00
Lukas Wirth
77afc6e793
fix: Report remaining macro errors in assoc item collection
2023-04-22 11:49:00 +02:00
bors
34ebb30e84
Auto merge of #14610 - lowr:fix/hygiene-for-meta-item, r=Veykril
...
fix: Resolve `$crate` in derive paths
Paths in derive meta item list may contain any kind of paths, including those that start with `$crate` generated by macros. We need to take hygiene into account when we lower paths in the list.
This issue was identified while investigating #14607 , though this patch doesn't fix the broken trait resolution.
2023-04-22 09:36:38 +00:00
Ryo Yoshida
85e76542fe
Cache Hygiene
in DefCollector
2023-04-22 18:22:29 +09:00
bors
6f43a56201
Auto merge of #14633 - Veykril:assoc-collect, r=Veykril
...
internal: Don't reparse files when trying to expand assoc item macro calls
2023-04-22 09:02:25 +00:00
Lukas Wirth
2aa44c8e37
internal: Don't reparse files when trying to expand assoc item macro calls
2023-04-22 11:02:11 +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
Ryo Yoshida
cf72b6232b
Resolve $crate
in derive paths
2023-04-20 15:50:17 +09:00
bors
2400b36a2e
Auto merge of #14577 - jsoref:spelling, r=lnicola
...
Spelling
This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling ).
The misspellings have been reported at https://github.com/jsoref/rust-analyzer/actions/runs/4699991040#summary-12751355796
The action reports that the changes in this PR would make it happy: https://github.com/jsoref/rust-analyzer/actions/runs/4699991284#summary-12751356293
closes #14567
2023-04-19 14:05:40 +00:00
Josh Soref
bc7d84c3ce
Spelling
...
* a rule
* access
* after
* amount
* annotations
* assignment
* assist
* associated
* attribute
* borrowed
* built-in type
* clarification
* command
* const
* constructor
* corresponding
* counterparts
* curlies
* dependencies
* deterministic
* diagnostic
* duplicates
* edge
* edited
* efficient
* elsewhere
* execution
* expression
* extensions
* extracted
* fill
* github
* helper
* heuristic
* incomplete
* indent end
* inlay
* invocation
* lifetime
* looking
* maybe
* move
* mutability
* mutable
* necessarily
* necessary
* negative
* nonexistent
* occurred
* offsets
* offsetted
* overridden
* parameters
* params
* params_and_where_preds_in_scope
* paredit
* parent
* parentheses
* prepended if
* punctuation
* receive
* receiver
* referring
* repeated
* representing
* semantically
* separately
* shouldnot
* siblings
* similar
* something's
* statement
* struct
* structure
* surprise
* the
* this
* transparent
* unimplemented
* unnamed
* unnecessary
* unneeded
* unreachable
* unterminated
* utilities
* variant
* variants
* visibility
* work around (v)
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-19 09:45:55 -04:00
bors
9b835f334f
Auto merge of #14594 - Veykril:Simplify, r=Veykril
...
internal: Move Expander and LowerCtx into separate modules
2023-04-17 19:00:42 +00:00
Lukas Wirth
bca8029a6e
Move Expander and LowerCtx into separate modules
2023-04-17 20:44:06 +02:00
Laurențiu Nicola
160ab88bb9
Bump bitflags
2023-04-17 18:42:59 +03:00
bors
9b54e39762
Auto merge of #14587 - Veykril:macro-def-err, r=Veykril
...
fix: Bring back LRU limit for macro_expand query
Should fix the memory increase
2023-04-16 19:30:42 +00:00
Lukas Wirth
76718ea2fc
Bring back LRU limit for macro_expand query
2023-04-16 21:30:04 +02:00
bors
924d30a772
Auto merge of #14585 - Veykril:macro-def-err, r=Veykril
...
Make `ExpandDatabase::parse_macro_expansion` and `ExpandDatabase::parse_or_expand` infallible
2023-04-16 18:50:02 +00:00
Lukas Wirth
4ea5d7f6a0
Re-introduce option for macro_arg to prevent calling macros with empty inputs
2023-04-16 20:26:26 +02:00
bors
697b335fda
Auto merge of #14584 - Veykril:macro-def-err, r=Veykril
...
internal: Report item-level macro expansion syntax errors
2023-04-16 17:40:20 +00:00
Lukas Wirth
a2a3fecae3
Option begone part 2
2023-04-16 19:20:48 +02:00
Lukas Wirth
96a774261f
Option begone part 1
2023-04-16 19:20:42 +02:00
Lukas Wirth
0f4ffaa5af
Fix duplicate eager expansion errors
2023-04-16 19:20:35 +02:00
Amanieu d'Antras
35fc5780a7
Remove #[alloc_error_handler] from the compiler and library
2023-04-16 08:35:50 -07:00
Lukas Wirth
d1632c2727
Report syntax errors from item level macro expansions
2023-04-16 17:22:06 +02:00
Lukas Wirth
6ae8d49e15
Simplify eager macro error handling
2023-04-16 15:46:12 +02:00