aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* cargo fmtMaan20032021-06-131-27/+24
|
* clippy::useless_conversionMaan20032021-06-131-6/+3
|
* Expand procedural attribute macrosJonas Schievink2021-06-031-0/+40
|
* internal: move diagnostics to hirAleksey Kladov2021-05-251-8/+9
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Infer correct expected type for generic struct fieldsFlorian Diebold2021-05-231-0/+8
|
* Rewrite `attr.rs` to allow using syntax-based indicesJonas Schievink2021-05-101-1/+1
|
* Move `AttrId` back into `hir_def`Jonas Schievink2021-05-101-3/+3
|
* Precompute macro fragment kindJonas Schievink2021-05-091-2/+10
|
* Don't store call-site text offsets in hygiene infoJonas Schievink2021-05-061-2/+2
|
* Merge #8462bors[bot]2021-04-191-0/+1
|\ | | | | | | | | | | | | | | 8462: Expand macros at type position r=jonas-schievink a=cynecx Co-authored-by: cynecx <[email protected]>
| * hir_ty: Expand macros at type positioncynecx2021-04-171-0/+1
| |
* | Fix visibility of items in block modulesJonas Schievink2021-04-191-0/+12
|/
* Include path in `unresolved-macro-call` diagnosticJonas Schievink2021-04-161-4/+13
|
* 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.
* | Store `#[derive]` attribute ID along macro invocJonas Schievink2021-04-091-1/+3
| |
* | Use named fields in `MacroCallKind`Jonas Schievink2021-04-081-2/+7
|/
* Avoid O(n²) when constructing AttrSourceMapJonas Schievink2021-04-061-0/+8
|
* 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 `GenericParams`Jonas Schievink2021-04-051-1/+1
| | | | | Also share the same instance between `ItemTree` and `generic_params` query.
* Global TypeRef/TraitRef interningJonas Schievink2021-04-011-0/+1
|
* Rename derive-specific APIsJonas Schievink2021-03-191-2/+2
|
* Document fields of `ModuleId`Jonas Schievink2021-03-181-1/+5
|
* Make MacroDefId's `AstId` mandatory when possibleJonas Schievink2021-03-181-1/+1
|
* Follow established ErrorEmitted patternBrandon2021-03-171-11/+11
|
* Fix missing unresolved macro diagnostic in function bodyBrandon2021-03-161-10/+13
|
* Create TraitEnvironment through a queryFlorian Diebold2021-03-131-0/+10
|
* Delete `ContainerId`Jonas Schievink2021-03-091-33/+17
|
* Stop using `ContainerId` in `AssocContainerId`Jonas Schievink2021-03-091-3/+3
|
* Fix `find_path` when inner items are presentJonas Schievink2021-03-011-0/+23
|
* For unresolved macros, hightlight only the last segmentAleksey Kladov2021-02-281-58/+56
|
* Make `ModPath`'s representation privateJonas Schievink2021-02-041-1/+1
|
* Shortcut `block_def_map` if there's no inner itemsJonas Schievink2021-02-031-1/+8
| | | | | This previously didn't work, but apparently only because of the wonky test setup
* Intern block locations and handle them in ModuleIdJonas Schievink2021-01-251-1/+14
|
* Create all `ModuleId`s through a `DefMap` methodJonas Schievink2021-01-251-4/+0
| | | | | `ModuleId` needs to be able to represent blocks, and only the associated `DefMap` will know how to construct that `ModuleId`
* Make `ModuleId`'s `krate` field privateJonas Schievink2021-01-221-1/+9
|
* Obtain `ModuleId`'s `DefMap` through a methodJonas Schievink2021-01-221-1/+11
|
* prepare to publish el libro de arenaAleksey Kladov2021-01-141-1/+1
|
* Impl HasAttrs for GenericParamLukas Wirth2021-01-011-1/+21
|
* Add ConstParams to the HIRLukas Wirth2021-01-011-0/+7
|
* Add `AttrDefId::krate`Jonas Schievink2020-12-171-0/+30
| | | | Access to the containing crate will be needed to handle `cfg_attr`
* Merge #6818bors[bot]2020-12-121-0/+7
|\ | | | | | | | | | | | | | | | | | | 6818: Add Lifetimes to the HIR r=matklad a=Veykril This doesn't handle resolve yet as I don't know yet how that will be used. I'll get to that once I start moving the lifetime reference PR to the hir. This also adds a new `hir` name type for lifetimes and labels, `hir::LifetimeName`. Co-authored-by: Lukas Wirth <[email protected]>
| * Add Lifetimes to the HIRLukas Wirth2020-12-111-0/+7
| |
* | Add builtin attributes for use in nameresJonas Schievink2020-12-111-0/+1
|/
* Remove hir_def/docs.rs moduleLukas Wirth2020-12-071-1/+0
|
* Fix proc macro token mappingJonas Schievink2020-12-031-2/+2
|
* Propagate eager expansion errorsJonas Schievink2020-12-031-10/+41
|
* Deny unreachable-pubAleksey Kladov2020-11-021-3/+3
| | | | | | | | It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034.
* Rename ra_hir_def -> hir_defAleksey Kladov2020-08-131-0/+541