aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres
Commit message (Collapse)AuthorAgeFilesLines
* Nest all the or-patterns!Lukas Wirth2021-06-171-1/+1
|
* minor: add a test variationAleksey Kladov2021-06-151-5/+13
|
* internal: document that we don't #[ignore] testsAleksey Kladov2021-06-151-8/+13
|
* internal: refactor macro errorAleksey Kladov2021-06-132-77/+0
|
* internal: refactor inactive code diagnosticsAleksey Kladov2021-06-131-42/+0
|
* internal: refactor unresolved macro call diagnosticAleksey Kladov2021-06-131-31/+0
|
* internal: refactor unresolved import diagnosticAleksey Kladov2021-06-131-37/+0
|
* internal: refactor unresolved extern crate diagnosticAleksey Kladov2021-06-131-29/+0
|
* internal: start new diagnostics APIAleksey Kladov2021-06-131-14/+0
| | | | | | | | | | | | | | | | | | At the moment, this moves only a single diagnostic, but the idea is reafactor the rest to use the same pattern. We are going to have a single file per diagnostic. This file will define diagnostics code, rendering range and fixes, if any. It'll also have all of the tests. This is similar to how we deal with assists. After we refactor all diagnostics to follow this pattern, we'll probably move them to a new `ide_diagnostics` crate. Not that we intentionally want to test all diagnostics on this layer, despite the fact that they are generally emitted in the guts on the compiler. Diagnostics care to much about the end presentation details/fixes to be worth-while "unit" testing. So, we'll unit-test only the primary output of compilation process (types and name res tables), and will use integrated UI tests for diagnostics.
* clippy::redudant_borrowMaan20032021-06-132-12/+12
|
* Implement dummy expansions for builtin attributesLukas Wirth2021-06-091-1/+3
|
* Handle attribute macros in `descend_into_macros`Jonas Schievink2021-06-061-0/+5
|
* Return `ReachedFixedPoint::No` when resolving derive helperJonas Schievink2021-06-041-0/+1
|
* Make it opt-inJonas Schievink2021-06-031-0/+4
|
* Expand procedural attribute macrosJonas Schievink2021-06-031-6/+50
|
* Fall back to legacy preludeJonas Schievink2021-06-011-14/+27
|
* Implement per-edition preludesJonas Schievink2021-06-013-58/+173
|
* 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-302-16/+41
| |
* | Thread proc-macro types through the HIRJonas Schievink2021-05-292-2/+17
| |
* | Test that `ItemTree` works as intendedJonas Schievink2021-05-271-1/+73
|/
* Stop expanding UseTrees during ItemTree loweringJonas Schievink2021-05-262-34/+48
|
* internal: move diagnostics to hirAleksey Kladov2021-05-253-45/+109
| | | | | | | | | | | | | | | | | | | | | | | 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-222-9/+39
|
* Remove `StructDefKind`Jonas Schievink2021-05-211-3/+3
|
* Don't lower extern block in the ItemTreeJonas Schievink2021-05-212-0/+37
|
* Support `#[register_attr]` and `#[register_tool]`Jonas Schievink2021-05-202-32/+92
|
* 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-202-85/+135
|
* 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-192-4/+33
|
*-. Merge #8885 #8887bors[bot]2021-05-192-14/+35
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-192-2/+26
| |/ |/|
| * 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-172-1/+3
| |
* | Fix #8834ivan7702021-05-162-0/+19
|/
* Move `AttrId` back into `hir_def`Jonas Schievink2021-05-101-2/+2
|
* Test that none of the macros are reparsedJonas Schievink2021-05-091-0/+6
|
* Precompute macro fragment kindJonas Schievink2021-05-091-6/+14
|
* Update crates/hir_def/src/nameres/tests/incremental.rsAleksey Kladov2021-05-061-1/+1
| | | Co-authored-by: Jonas Schievink <[email protected]>