aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
Commit message (Collapse)AuthorAgeFilesLines
* Add commentJonas Schievink2021-06-031-0/+3
|
* Implement `#[rustc_skip_array_during_method_dispatch]`Jonas Schievink2021-06-011-1/+13
|
* Fall back to legacy preludeJonas Schievink2021-06-011-14/+27
|
* Implement per-edition preludesJonas Schievink2021-06-014-69/+186
|
* Expand fixme commentsDawer2021-05-311-1/+4
|
* Clean up, more docs.Dawer2021-05-311-4/+1
|
* Implement struct ctor applicationDawer2021-05-311-1/+1
|
* 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-303-16/+48
| |
* | Thread proc-macro types through the HIRJonas Schievink2021-05-292-2/+17
| |
* | hir_ty: use async ret type for inference inside async bodiescynecx2021-05-294-3/+9
| |
* | Test that `ItemTree` works as intendedJonas Schievink2021-05-271-1/+73
| |
* | Don't store supertraits in ItemTreeLaurențiu Nicola2021-05-275-13/+3
|/
* Drop `ignore` from doctestsJonas Schievink2021-05-271-3/+3
|
* Reduce memory usage a bitJonas Schievink2021-05-262-9/+14
|
* Clean up ItemTree lowering now that it's 1:1Jonas Schievink2021-05-261-53/+26
|
* Stop expanding UseTrees during ItemTree loweringJonas Schievink2021-05-2610-168/+312
|
* Merge #8973bors[bot]2021-05-2512-621/+232
|\ | | | | | | | | | | | | | | 8973: internal: move diagnostics to hir r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * internal: move diagnostics to hirAleksey Kladov2021-05-2512-621/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Consider trait to be in scope for trait-implLukas Wirth2021-05-251-13/+25
| |
* | Fix lowering of FnOnce() without return typeFlorian Diebold2021-05-251-12/+15
|/ | | | This should result in an implicit `-> ()`, not leaving out the binding.
* internal: intern `AttrInput`Jonas Schievink2021-05-243-13/+14
|
* Intern `GenericArgs`Jonas Schievink2021-05-244-11/+10
| | | | This shaves off another ~4 mb or so
* internal: intern `TypeBound`sJonas Schievink2021-05-249-25/+39
| | | | | Doesn't save much memory (~2 mb), but interning things is generally a good pattern to follow
* Merge #8945bors[bot]2021-05-231-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | 8945: fix: Make expected type work in more situations r=flodiebold a=flodiebold Also makes call info show the correct types for generic methods. ![2021-05-23-182952_1134x616_scrot](https://user-images.githubusercontent.com/906069/119269023-dd5a5b00-bbf5-11eb-993a-b6e122c3b9a6.png) ![2021-05-23-183117_922x696_scrot](https://user-images.githubusercontent.com/906069/119269025-dfbcb500-bbf5-11eb-983c-fc415b8428e0.png) Co-authored-by: Florian Diebold <[email protected]>
| * Infer correct expected type for generic struct fieldsFlorian Diebold2021-05-231-0/+8
| |
* | internal: document ItemTree designJonas Schievink2021-05-231-2/+32
|/
* Explain why nested `TypeRef` aren't internedJonas Schievink2021-05-231-0/+4
|
* Render where clauses and more generic paramsJonas Schievink2021-05-232-34/+155
|
* Pretty-print generic parametersJonas Schievink2021-05-232-22/+99
|
* ItemTree: pretty-print all pathsJonas Schievink2021-05-222-9/+119
|
* Work around non-unique AttrIdsJonas Schievink2021-05-222-9/+39
|
* Add an ItemTree pretty-printerJonas Schievink2021-05-213-0/+780
|
* impl Display for AttrInput/ImportAliasJonas Schievink2021-05-212-1/+19
|
* Remove `StructDefKind`Jonas Schievink2021-05-213-20/+4
|
* Don't lower extern block in the ItemTreeJonas Schievink2021-05-214-20/+79
|
* 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-192-28/+160
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| |