aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * Update ungrammar for const block patternsLukas Wirth2020-12-231-1/+3
| |
* | Don't think that /submod.rs is /mod.rsAleksey Kladov2020-12-231-1/+1
|/
* Merge #6921bors[bot]2020-12-201-6/+31
|\ | | | | | | | | | | | | | | 6921: Higher-ranked trait bounds for where clauses r=flodiebold a=Veykril There is a slight problem with this which is also noted in a FIXME now but `LifetimeParameters` of these ForLifetime where clauses allocate the lifetimes in the corresponding arena as if they were lifetimes of the item itself and not just the clause they belong to. I wasn't entirely sure what I could do about this but given nothing really uses lifetimes like that currently I figured it might be fine? Open to suggestions for that problem. Co-authored-by: Lukas Wirth <[email protected]>
| * Higher-ranked trait bounds for where clausesLukas Wirth2020-12-171-6/+31
| |
* | Add API for mapping `Attr` back to its syntax nodeJonas Schievink2020-12-191-23/+55
| |
* | Make `RawAttrs` crate-privateJonas Schievink2020-12-191-2/+2
| | | | | | | | There should be no need to use this from outside
* | Remove `Attrs::merge`Jonas Schievink2020-12-191-12/+0
| | | | | | | | Only the `RawAttrs` version of this is in use
* | Remove resolved FIXMEJonas Schievink2020-12-191-1/+0
| |
* | fixture -> ra_fixtureJonas Schievink2020-12-192-4/+4
| |
* | Test paths to derive macrosJonas Schievink2020-12-191-2/+2
| |
* | More accurate `#[derive]` parsingJonas Schievink2020-12-193-27/+59
| | | | | | | | This now allows full paths to the derive macro
* | Merge #6935bors[bot]2020-12-183-15/+28
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 6935: Don't look at attributes when lowering to ItemTree r=jonas-schievink a=jonas-schievink Resolves 2 `cfg_attr` FIXMEs bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| * | Don't look at attributes when lowering to ItemTreeJonas Schievink2020-12-183-15/+28
| | | | | | | | | | | | Resolves 2 `cfg_attr` FIXMEs
* | | Hit a markJonas Schievink2020-12-182-0/+5
| | |
* | | Add testJonas Schievink2020-12-181-0/+16
| | |
* | | Fix parsing of active cfg_attrJonas Schievink2020-12-181-2/+2
| | |
* | | Implement `RawAttr::filter`Jonas Schievink2020-12-181-3/+61
|/ /
* | Refactor attributes API to allow handling cfg_attrJonas Schievink2020-12-188-114/+187
| |
* | Make `Attrs::from_attrs_owner` privateJonas Schievink2020-12-171-1/+1
| |
* | Add `AttrDefId::krate`Jonas Schievink2020-12-171-0/+30
|/ | | | Access to the containing crate will be needed to handle `cfg_attr`
* Remove `module_lang_items`Jonas Schievink2020-12-162-54/+30
| | | | | It isn't used anywhere except in `crate_lang_items`. Remove it to slightly reduce memory usage and simplify the code.
* Avoid querying attributes in item tree loweringJonas Schievink2020-12-163-38/+28
| | | | | | | | ItemTree is per-file, so there is no unique crate associated with it. This means that it cannot know the active CfgOptions and thus couldn't handle `cfg_attr`. Prepare it for `cfg_attr`s by avoiding accessing attributes.
* Merge #6896bors[bot]2020-12-165-31/+20
|\ | | | | | | | | | | | | | | | | | | | | | | 6896: Node-ify lifetimes r=jonas-schievink a=Veykril Let's see if this passes the tests 🤞 Depends on https://github.com/rust-analyzer/ungrammar/pull/15 Co-authored-by: Jonas Schievink <[email protected]> Co-authored-by: Jonas Schievink <[email protected]> Co-authored-by: Lukas Wirth <[email protected]>
| * Node-ify lifetimesLukas Wirth2020-12-165-31/+20
| |
* | Merge #6897bors[bot]2020-12-166-19/+102
|\| | | | | | | | | | | | | | | | | | | | | | | | | 6897: Basic support for macros 2.0 r=jonas-schievink a=jonas-schievink This adds support for (built-in-only) macros 2.0, and removes some hacks used for builtin derives, which are declared via macros 2.0 in libcore. First steps for https://github.com/rust-analyzer/rust-analyzer/issues/2248. Blocked on https://github.com/rust-analyzer/ungrammar/pull/16. Co-authored-by: Jonas Schievink <[email protected]> Co-authored-by: Jonas Schievink <[email protected]>
| * Make macro def krate mandatoryJonas Schievink2020-12-154-15/+38
| | | | | | | | Refactors builtin derive support to go through proper name resolution
| * Basic support for decl macros 2.0Jonas Schievink2020-12-154-5/+65
| |
* | Merge #6879bors[bot]2020-12-153-21/+35
|\ \ | |/ |/| | | | | | | | | | | 6879: Change HasChildSource::ChildId assoc item to generic param r=matklad a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
| * Change HasChildSource::ChildId assoc item to generic paramLukas Wirth2020-12-153-21/+35
| |
* | Move to upstream `macro_rules!` modelJonas Schievink2020-12-155-118/+132
| |
* | Merge #6886bors[bot]2020-12-152-82/+137
|\ \ | |/ |/| | | | | | | | | | | 6886: Expand statements for macros in lowering r=matklad a=edwin0cheng Fixes #6811 Co-authored-by: Edwin Cheng <[email protected]>
| * Expand statements for mbe in loweringEdwin Cheng2020-12-152-82/+137
| |
* | Add LifetimeParam resolving to SemanticsLukas Wirth2020-12-143-26/+33
|/
* Ignore lifetime params in substitutionsLukas Wirth2020-12-131-1/+4
|
* Merge #6818bors[bot]2020-12-127-46/+118
|\ | | | | | | | | | | | | | | | | | | 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-117-46/+118
| |
* | Use Attrs::docs in NavigationTarget instead of DocCommentsOwnerLukas Wirth2020-12-111-1/+1
| |
* | Merge #6834bors[bot]2020-12-111-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6834: Use Attrs::docs in runnables instead of DocCommentsOwner r=kjeremy a=Veykril I figured that we should probably move as much of the doc usage to the HIR as possible hence this PR. If we should keep this AST-based feel free to close. This change does have the nice(but not really useful as I doubt anyones gonna write doc tests like these) side effect that these two doc string snippets allow being run now. ![image](https://user-images.githubusercontent.com/3757771/101945607-bf241400-3bee-11eb-96ce-ccae80028b1f.png) ![image](https://user-images.githubusercontent.com/3757771/101946375-2e9a0380-3bef-11eb-9950-e35168fdd048.png) Co-authored-by: Lukas Wirth <[email protected]>
| * | Use Attrs::docs in runnables instead of DocCommentsOwnerLukas Wirth2020-12-111-3/+3
| |/
* | Add upstream commit to builtin_attr.rsJonas Schievink2020-12-111-0/+2
| |
* | Add builtin attributes for use in nameresJonas Schievink2020-12-112-0/+429
|/
* Remove item tree testsJonas Schievink2020-12-102-441/+0
| | | | | They were useful during initial development of the item tree, but now just cause churn
* Ignore extern items in incorrect-case checkJonas Schievink2020-12-103-5/+17
|
* Introduce anchored_pathAleksey Kladov2020-12-092-5/+6
| | | | | They allow to represent paths like `#[path = "C:\path.rs"] mod foo;` in a lossless cross-platform & network-transparent way.
* Merge #6771bors[bot]2020-12-091-5/+47
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6771: Properly attach inner attributes in Attrs::new r=matklad a=Veykril Properly attach inner and outer attributes to the things they actually belong to in the HIR. ~~I can add some tests for this if wanted once I know where to put them/how to test for this.~~ Put some tests into `hover.rs`. So the following snippet ```rust mod foo { //! Hello } ``` now shows `Hello` on hover 🎉 Fixes #2148 Co-authored-by: Lukas Wirth <[email protected]>
| * Properly fetch inner and outer docs on hir-levelLukas Wirth2020-12-091-17/+25
| |
| * Properly fetch inner and outer attributes on hir-levelLukas Wirth2020-12-081-5/+39
| |
* | Merge #6774bors[bot]2020-12-091-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 6774: Increment recursion count in Expander only on success r=lnicola a=Veykril Fixes #6764 Co-authored-by: Lukas Wirth <[email protected]>
| * | Properly decrement recursion count in ExpanderLukas Wirth2020-12-091-2/+2
| |/
* | Use `original_file_range` in `TestDB`Jonas Schievink2020-12-081-9/+3
| |