aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src
Commit message (Collapse)AuthorAgeFilesLines
* Return absolute paths in find_path if crate start is ambiguousLukas Wirth2021-05-131-2/+11
|
* Test that none of the macros are reparsedJonas Schievink2021-05-091-0/+6
|
* Precompute macro fragment kindJonas Schievink2021-05-095-11/+29
|
* Reuse database in LowerCtxJonas Schievink2021-05-064-15/+11
|
* Update crates/hir_def/src/nameres/tests/incremental.rsAleksey Kladov2021-05-061-1/+1
| | | Co-authored-by: Jonas Schievink <[email protected]>
* internal: add failing incremental testAleksey Kladov2021-05-061-0/+52
|
* Don't store call-site text offsets in hygiene infoJonas Schievink2021-05-0612-63/+99
|
* Fix block comment intra doc link injection rangesLukas Tobias Wirth2021-05-041-4/+8
|
* find_path: check only crate-level preludeJonas Schievink2021-04-301-2/+28
|
* Remove `ItemTree::all_inner_items`Jonas Schievink2021-04-211-7/+0
|
* Add failing local items testJonas Schievink2021-04-213-0/+46
|
* Fix some find_path bugs around inner itemsJonas Schievink2021-04-191-5/+58
|
* fix: false positive about inner attrs in docsAleksey Kladov2021-04-191-2/+2
| | | | closes #8541
* Merge #8462bors[bot]2021-04-197-36/+72
|\ | | | | | | | | | | | | | | 8462: Expand macros at type position r=jonas-schievink a=cynecx Co-authored-by: cynecx <[email protected]>
| * hir_ty: keep body::Expander in TyLoweringContextcynecx2021-04-182-45/+11
| |
| * hir_def: various cleanupscynecx2021-04-183-11/+9
| |
| * hir_def: refactor expand_macro_type and cleanupscynecx2021-04-172-120/+30
| |
| * hir_def: ignore ast::Type in file_item_tree querycynecx2021-04-172-10/+11
| |
| * hir_ty: Expand macros at type positioncynecx2021-04-178-49/+210
| |
* | Fix visibility of items in block modulesJonas Schievink2021-04-192-1/+21
|/
* Fix `TestDB::module_at_position` with submodulesJonas Schievink2021-04-172-2/+72
|
* Merge #8542bors[bot]2021-04-167-19/+39
|\ | | | | | | | | | | | | | | 8542: Include path in `unresolved-macro-call` diagnostic r=matklad a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]>
| * Include path in `unresolved-macro-call` diagnosticJonas Schievink2021-04-167-19/+39
| |
* | Fix primitive shadowing with inner itemsJonas Schievink2021-04-161-1/+7
|/
* Remove unneeded annotations from find_path testsJonas Schievink2021-04-151-6/+0
|
* Make find_path tests adhere to style guideJonas Schievink2021-04-151-260/+327
|
* Merge #8432bors[bot]2021-04-131-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8432: decl_check: consider outer scopes' allows r=jonas-schievink a=lf- Fix #8417. Also makes it less noisy about no_mangle annotated stuff the user can do nothing about. Note: this still is broken with bitfield! macros. A repro in an ignore test is included here. I believe this bug is elsewhere, and I don't think I can work around it here. I would like help filing the remaining bug, as it does actually affect users, but I don't know how to describe the behaviour (or even if it is unintended). Co-authored-by: Jade <[email protected]>
| * decl_check: consider outer scopes' allowsJade2021-04-081-0/+10
| | | | | | | | | | | | | | | | | | Fix #8417. Also makes it less noisy about no_mangle annotated stuff the user can do nothing about. Note: this still is broken with bitfield! macros. A repro in an ignore test is included here. I believe this bug is elsewhere, and I don't think I can work around it here.
* | Support macros in pattern positionJonas Schievink2021-04-113-8/+33
| |
* | Avoid an unnecessary `collect`Jonas Schievink2021-04-091-3/+1
| |
* | Merge #8450bors[bot]2021-04-091-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 8450: Don't ignore unnamed consts when looking for definitions r=Veykril a=Veykril Fixes #8448 bors r+ Co-authored-by: Lukas Wirth <[email protected]>
| * | Insert unnamed consts to ChildBySource DynMapLukas Wirth2021-04-091-0/+4
| | |
* | | Resolve prelude and crate root names in the root DefMapJonas Schievink2021-04-092-7/+34
| | |
| | |
| \ \
*-. \ \ Merge #8443 #8446bors[bot]2021-04-095-35/+39
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8443: Rewrite `#[derive]` removal code to be based on AST r=jonas-schievink a=jonas-schievink We now remove any `#[derive]` before and including the one we want to expand, in the `macro_arg` query. The same infra will be needed by attribute macros (except we only remove the attribute we're expanding, not any preceding ones). Part of https://github.com/rust-analyzer/rust-analyzer/issues/8434 (doesn't implement the cfg-expansion yet, because that's more difficult) 8446: Undo path resolution hack for extern prelude r=jonas-schievink a=jonas-schievink Reverts the change made in https://github.com/rust-analyzer/rust-analyzer/pull/7959 We don't populate the extern prelude for block DefMaps anymore, so this is unnecessary bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| | * | Undo path resolution hack for extern preludeJonas Schievink2021-04-091-9/+4
| |/ / |/| | | | | | | | | | | We don't populate the extern prelude for block DefMaps anymore, so this is unnecessary
| * | Store `#[derive]` attribute ID along macro invocJonas Schievink2021-04-093-9/+15
| | |
| * | Rename `Attr`s `index` field to `id`Jonas Schievink2021-04-091-8/+8
| | |
| * | Add `AttrId` to track attribute sourcesJonas Schievink2021-04-091-14/+17
|/ /
* | Use named fields in `MacroCallKind`Jonas Schievink2021-04-083-17/+22
| |
* | Track recursion limit when expanding custom deriveJonas Schievink2021-04-081-1/+1
|/
* Update `OUT_DIR` diagnostic to match settingJonas Schievink2021-04-072-2/+2
|
* Collect trait impls inside unnamed constsJonas Schievink2021-04-071-0/+4
|
* nameres: collect unnamed constsJonas Schievink2021-04-072-14/+29
|
* Avoid O(n²) when constructing AttrSourceMapJonas Schievink2021-04-063-10/+70
|
* Lower attributes on tuple fieldsJonas Schievink2021-04-061-5/+4
|
* infer: remove `record_field_resolutions` fieldJonas Schievink2021-04-061-0/+13
| | | | | It stores no useful data, since we can derive all fields from `variant_resolutions`
* Intern TypeRefs stored in BodyJonas Schievink2021-04-062-8/+12
| | | | Minor improvement to memory usage (1 MB or so)
* Use Box'es to reduce the size of hir_def::expr::Pat from 112 to 64 bytes on ↵Alexandru Macovei2021-04-063-6/+12
| | | | 64bit
* Use Box'es to reduce size of hir_def::expr::Expr from 128 to 72 bytes (on ↵Alexandru Macovei2021-04-062-10/+14
| | | | | | | | | | 64bit systems) Rationale: only a minority of variants used almost half the size. By keeping large members (especially in Option) behind a box the memory cost is only payed when the large variants are needed. This reduces the size Vec<Expr> needs to allocate.
* 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]>