aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres/collector.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge #8866bors[bot]2021-05-311-2/+2
|\ | | | | | | | | | | | | | | 8866: Update salsa r=matklad a=jonas-schievink This updates salsa to include https://github.com/salsa-rs/salsa/pull/265, and removes all cancellation-related code from rust-analyzer Co-authored-by: Jonas Schievink <[email protected]>
| * Update salsaJonas Schievink2021-05-271-2/+2
| |
* | Diagnose unimplemented built-in macrosJonas Schievink2021-05-301-16/+32
| |
* | Thread proc-macro types through the HIRJonas Schievink2021-05-291-2/+7
|/
* Stop expanding UseTrees during ItemTree loweringJonas Schievink2021-05-261-29/+37
|
* internal: move diagnostics to hirAleksey Kladov2021-05-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | The idea here is to eventually get rid of `dyn Diagnostic` and `DiagnosticSink` infrastructure altogether, and just have a `enum hir::Diagnostic` instead. The problem with `dyn Diagnostic` is that it is defined in the lowest level of the stack (hir_expand), but is used by the highest level (ide). As a first step, we free hir_expand and hir_def from `dyn Diagnostic` and kick the can up to `hir_ty`, as an intermediate state. The plan is then to move DiagnosticSink similarly to the hir crate, and, as final third step, remove its usage from the ide. One currently unsolved problem is testing. You can notice that the test which checks precise diagnostic ranges, unresolved_import_in_use_tree, was moved to the ide layer. Logically, only IDE should have the infra to render a specific range. At the same time, the range is determined with the data produced in hir_def and hir crates, so this layering is rather unfortunate. Working on hir_def shouldn't require compiling `ide` for testing.
* internal: intern `AttrInput`Jonas Schievink2021-05-241-1/+1
|
* Work around non-unique AttrIdsJonas Schievink2021-05-221-8/+22
|
* Remove `StructDefKind`Jonas Schievink2021-05-211-3/+3
|
* Don't lower extern block in the ItemTreeJonas Schievink2021-05-211-0/+1
|
* Support `#[register_attr]` and `#[register_tool]`Jonas Schievink2021-05-201-32/+75
|
* Rename `ignore_attrs_on` to `skip_attrs`Jonas Schievink2021-05-201-6/+6
|
* SimplifyJonas Schievink2021-05-201-4/+2
|
* Refactor name resolution to resolve derive helpersJonas Schievink2021-05-201-85/+113
|
* Rename `unexpanded_macros` to `unresolved_macros`Jonas Schievink2021-05-201-15/+31
|
* Track in-scope derive helpers during nameresJonas Schievink2021-05-191-8/+26
|
* Fix unresolved attribute fallback againJonas Schievink2021-05-191-4/+4
|
*-. Merge #8885 #8887bors[bot]2021-05-191-13/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8885: internal: greatly simplify eager macro representation r=jonas-schievink a=jonas-schievink - Share structures with lazy macros, make both use `MacroCallLoc`. - Remove `intern_eager_expansion`, `EagerCallLoc`, `EagerMacroId`, and *many* matches on `MacroCallId`. - Make a lot of FIXMEs obsolete since the code no longer distinguishes between eager and lazy macros. - Add `EagerCallInfo`, which is `Some` for calls to eager macros and holds the argument or expansion result and the included file. 8887: fix: fix derive collection after unresolved attribute fallback r=jonas-schievink a=jonas-schievink Fixes https://github.com/rust-analyzer/rust-analyzer/pull/8882#issuecomment-844379170 bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| | * Fix derive collection after unresolved attribute fallbackJonas Schievink2021-05-191-1/+5
| |/ |/|
| * Simplify eager macro representationJonas Schievink2021-05-191-12/+9
|/
* Merge #8882bors[bot]2021-05-191-27/+153
|\ | | | | | | | | | | | | | | | | | | | | | | 8882: internal: resolve attributes in name resolution (minimal version) r=jonas-schievink a=jonas-schievink Closes https://github.com/rust-analyzer/rust-analyzer/pull/7049 This should not have any observable effect, since we don't attempt to expand attribute macros yet, and I have implemented a fallback that treats items with unresolved attributes as if the attribute wasn't there. Derive helpers are not yet resolved. `#![register_{attr,tool}]` are not yet supported. Co-authored-by: Jonas Schievink <[email protected]>
| * Rewrite `resolve_imports` to use an iteratorJonas Schievink2021-05-191-19/+23
| | | | | | | | This allows reusing the original vector's allocation
| * Restructure nameres loop to be a bit clearerJonas Schievink2021-05-191-38/+41
| |
| * internal: resolve attributes in name resolutionJonas Schievink2021-05-191-2/+121
| |
* | Merge #8871bors[bot]2021-05-181-23/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | 8871: internal: Simplify `DefCollector::resolve_macros` r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| * | Simplify `DefCollector::resolve_macros`Jonas Schievink2021-05-181-23/+13
| |/
* | Added cov markivan7702021-05-171-0/+1
| |
* | Fix #8834ivan7702021-05-161-0/+4
|/
* Move `AttrId` back into `hir_def`Jonas Schievink2021-05-101-2/+2
|
* Precompute macro fragment kindJonas Schievink2021-05-091-6/+14
|
* Include path in `unresolved-macro-call` diagnosticJonas Schievink2021-04-161-4/+5
|
* Resolve prelude and crate root names in the root DefMapJonas Schievink2021-04-091-1/+2
|
* Store `#[derive]` attribute ID along macro invocJonas Schievink2021-04-091-7/+11
|
* Use named fields in `MacroCallKind`Jonas Schievink2021-04-081-1/+1
|
* Track recursion limit when expanding custom deriveJonas Schievink2021-04-081-1/+1
|
* nameres: collect unnamed constsJonas Schievink2021-04-071-13/+21
|
* Merge #8352bors[bot]2021-04-051-9/+3
|\ | | | | | | | | | | | | | | 8352: Remove dead legacy macro expansion code r=lnicola a=brandondong I was investigating some unrelated macro issue when I noticed this dead code. This legacy macro expansion logic was changed in https://github.com/rust-analyzer/rust-analyzer/pull/8128. Co-authored-by: Brandon <[email protected]>
| * Remove dead legacy macro expansion codeBrandon2021-04-051-9/+3
| |
* | Use shrink_to_fit to reduce DefMap sizesJonas Schievink2021-04-031-1/+3
| |
* | Intern `ModPath` in `Import`Jonas Schievink2021-04-031-2/+6
| | | | | | | | Minor savings only
* | Support `#[rustc_builtin_macro = "builtin_name"]`Jonas Schievink2021-04-031-1/+11
| |
* | Only populate prelude for crate-level DefMapsJonas Schievink2021-04-021-14/+16
| |
* | Intern Attr, MacroCall and Path componentsJonas Schievink2021-04-011-1/+1
| |
* | Basic Support Macro 2.0Edwin Cheng2021-03-271-39/+63
|/
* Merge bang-macros and derives in name resolutionJonas Schievink2021-03-231-86/+79
|
* Expand legacy-scoped macro during collectionJonas Schievink2021-03-211-6/+7
|
* Fix handling of `#![cfg]` in outline module fileJonas Schievink2021-03-191-21/+29
|
* Rename derive-specific APIsJonas Schievink2021-03-191-4/+4
|
* Record custom derive helpers in `DefMap`Jonas Schievink2021-03-181-24/+9
| | | | Also clean up proc macro attribute parsing a bit
* Store an `AstId` for procedural macrosJonas Schievink2021-03-181-6/+7
|