Lukas Wirth
e55ed52003
Simplify
2022-03-26 18:37:40 +01:00
Jonas Schievink
18ad750786
fix: properly import all types of macros with #[macro_use] again
2022-03-23 14:34:27 +01:00
Lukas Wirth
cb1b7e18fe
internal: Improve find_path
and extern prelude handling
2022-03-22 15:54:46 +01:00
Matthias Krüger
56e4ea59d9
more clippy fixes:
...
clippy::match_like_matches_macro
clippy::to_string_in_format_args
clippy::single_char_add_str
clippy::filter_map_identity
clippy::clone_on_copy
clippy::useless_format
clippy::unused_unit
2022-03-12 16:50:49 +01:00
Matthias Krüger
62ed658311
fix clippy::useless_conversion
2022-03-12 16:50:49 +01:00
Lukas Wirth
a9dd606387
fix: Show what file paths were expected for unresolved modules
2022-03-11 17:08:30 +01:00
Lukas Wirth
3edc5dcea8
fix: Properly handle proc-macro crate types for nameres
2022-03-09 14:33:39 +01:00
Lukas Wirth
2537ad0d9e
Simplify
2022-03-09 11:26:06 +01:00
Lukas Wirth
4e94fb7028
Fix ProcMacroData recording wrong name for derives
2022-03-09 01:13:38 +01:00
Lukas Wirth
55ec93a337
Remove unnecessary macro_declarations from ItemScope
2022-03-09 00:19:53 +01:00
Lukas Wirth
dbada38b61
Only store derive<->derive-helper mapping in DefMap
2022-03-09 00:01:19 +01:00
Lukas Wirth
42d46325a1
Add MacroId to hir_def in attempt to unify Macros with ModuleDefId
2022-03-08 21:50:00 +01:00
Lukas Wirth
ffeec9dec9
Simplify
2022-02-23 15:55:06 +01:00
Lukas Wirth
d3d054f574
Reduce visibility of proc-macros to pub(crate)
2022-02-23 12:00:04 +01:00
Lukas Wirth
8db88df758
simplify and document
2022-02-22 10:45:29 +01:00
Lukas Wirth
7b89d5ede2
internal: Expand the derive attribute into a pseudo expansion
2022-02-22 10:20:40 +01:00
Lukas Wirth
035bedc28b
internal: Remove name fields from MacroCallKind
2022-02-21 00:02:10 +01:00
Maybe Waffle
6d18c5b69d
feat: Honor recursion limit configuration
...
This patch makes RA understand `#![recursion_limit = "N"]` annotations.
- `crate_limits` query is moved to `DefDatabase`
- `DefMap` now has `recursion_limit: Option<u32>` field
2022-01-28 11:31:59 +03:00
Lukas Wirth
ca4baa6e55
Use FileAstId<ast::Adt>
in nameres where appropriate instead
2022-01-07 14:20:27 +01:00
Jonas Schievink
3ff68f25b8
Expand attribute macros on impl and trait items
2022-01-06 12:30:16 +01:00
Jonas Schievink
3eddda6f4c
simplify
2022-01-05 17:26:34 +01:00
Lukas Wirth
6b7b09d329
internal: Record unresolved derive invocations in hir
2022-01-02 23:44:23 +01:00
Lukas Wirth
44d61766b5
internal: Record unresolved derive invocations in hir
2022-01-01 20:43:25 +01:00
Jonas Schievink
b365b6119c
Treat extern blocks as item containers
2021-12-07 17:31:26 +01:00
Lukas Wirth
e58af219a4
feat: Resolve builtin-attr and tools in ide layer
2021-12-03 16:32:17 +01:00
Jake Heinz
6cf9969546
collect macro_rules! macros into macro declarations
2021-11-29 05:28:22 +00:00
Jake Heinz
1ed5699355
collect macros
2021-11-29 05:22:30 +00:00
Jonas Schievink
c291e5e284
Use the right ItemTree
when re-resolving attr
2021-11-26 03:57:25 +01:00
Jonas Schievink
3bb6f506ee
Build per-block ItemTree
s
2021-11-26 00:17:20 +01:00
Lukas Wirth
ea03defeac
fix: Diagnose invalid derive attribute input
2021-11-19 13:17:35 +01:00
Lukas Wirth
6757910934
fix: Diagnose using derive
on non-adt items
2021-11-19 12:10:55 +01:00
Lukas Wirth
966cae384f
minor: Simplify
2021-11-18 21:43:54 +01:00
Lukas Wirth
f72512f1c6
Simplify
2021-11-17 21:02:33 +01:00
Lukas Wirth
91bbc55eed
Check for derive attributes by item path, not derive
identifier
2021-11-17 20:46:57 +01:00
bors[bot]
32f425d801
Merge #10787
...
10787: minor: Simplify r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-17 14:55:18 +00:00
Lukas Wirth
6e1ecaef4f
Simplify
2021-11-17 15:54:38 +01:00
Lukas Wirth
b57289c4cb
Skip test/bench attr expansion in resolution instead of collection
2021-11-16 20:23:56 +01:00
Lukas Wirth
5c0b895f69
Rename intern_macro -> intern_macro_call
2021-11-14 16:25:47 +01:00
Lukas Wirth
439a8194b0
Replace more Name::to_string usages with Name::to_smol_str
2021-11-04 18:12:05 +01:00
Lukas Wirth
7fdbdc4ab2
Enable auto-import and qualify-path in derive attributes
2021-10-28 18:40:38 +02:00
Laurențiu Nicola
ca44b6892e
Use array IntoIter
2021-10-22 09:23:29 +03:00
Lukas Wirth
ea2a2c52fc
Don't resolve attributes to non attribute macros
2021-10-21 12:22:40 +02:00
Aleksey Kladov
55d8be5a24
internal: consistent module naming
2021-10-10 15:44:03 +03:00
Jonas Schievink
033f87c2f0
Add some profiling calls to name resolution
2021-10-01 15:30:00 +02:00
Jonas Schievink
0b76b29512
support non-extern-prelude dependencies
2021-09-28 21:23:46 +02:00
Jonas Schievink
7860d6ade6
Fix item-level lazy macro errors
2021-09-24 21:17:25 +02:00
Jonas Schievink
9a320bcf38
Support the new rustc_builtin_macro
syntax
2021-09-09 21:32:41 +02:00
Aleksey Kladov
dbb702cfc1
internal: remove accidental code re-use
...
FragmentKind played two roles:
* entry point to the parser
* syntactic category of a macro call
These are different use-cases, and warrant different types. For example,
macro can't expand to visibility, but we have such fragment today.
This PR introduces `ExpandsTo` enum to separate this two use-cases.
I suspect we might further split `FragmentKind` into `$x:specifier` enum
specific to MBE, and a general parser entry point, but that's for
another PR!
2021-09-05 22:36:36 +03:00
Lukas Wirth
36a5ce9790
minor: fix some clippy lints
2021-09-03 16:00:50 +02:00
Dezhi Wu
ba0947dded
switch log
crate to tracing
2021-08-30 15:11:42 +08:00