aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade expect-test to 1.1Jesse Bakker2021-01-031-1/+1
|
* Revert "Proper handling $crate and local_inner_macros"Jonas Schievink2021-01-031-1/+1
|
* Merge #7128bors[bot]2021-01-032-2/+41
|\ | | | | | | | | | | | | | | 7128: Implement HasAttrs for GenericParam r=matklad a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
| * Impl HasAttrs for GenericParamLukas Wirth2021-01-012-2/+41
| |
* | Use fully qualified `Itertools::intersperse` call to silence nightly ↵cynecx2021-01-021-8/+7
| | | | | | | | warnings about a potential name collision due to recent libstd api additions
* | Merge #7133bors[bot]2021-01-021-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | 7133: Proper handling $crate and local_inner_macros r=jonas-schievink a=edwin0cheng This PR introduces `HygineFrames` to store the macro definition/call site hierarchy in hyginee and when resolving `local_inner_macros` and `$crate`, we use the token to look up the corresponding frame and return the correct value. See also: https://rustc-dev-guide.rust-lang.org/macro-expansion.html#hygiene-and-hierarchies fixe #6890 and #6788 r? @jonas-schievink Co-authored-by: Edwin Cheng <[email protected]>
| * Introduce HygieneFrames for proper token hygineeEdwin Cheng2021-01-021-1/+1
| |
* | Merge #7080bors[bot]2021-01-015-14/+68
|\ \ | |/ |/| | | | | | | | | | | 7080: Implement ConstParams for HIR r=Veykril a=Veykril r? @flodiebold Co-authored-by: Lukas Wirth <[email protected]>
| * Add ConstParams to the HIRLukas Wirth2021-01-015-14/+68
| |
* | Remove some unneeded string allocationsLukas Wirth2020-12-311-1/+1
| |
* | Update crateskjeremy2020-12-301-1/+1
| |
* | SimplifyAleksey Kladov2020-12-301-2/+4
| |
* | Avoid a couple of allocationsLaurențiu Nicola2020-12-292-14/+15
| |
* | Better display methods in expect testsKirill Bulatov2020-12-281-15/+31
| |
* | Add testsKirill Bulatov2020-12-281-2/+71
| |
* | Add docs and optimisationsKirill Bulatov2020-12-281-4/+13
| |
* | Better query api and fuzzy searchKirill Bulatov2020-12-281-33/+40
| |
* | Draft the module exclusion in modulesKirill Bulatov2020-12-281-34/+62
|/
* Fixed old failed test due to new fixesEdwin Cheng2020-12-281-2/+2
|
* Merge #7021bors[bot]2020-12-243-52/+78
|\ | | | | | | | | | | | | | | 7021: Track labels in the HIR r=matklad a=Veykril Groundwork for #6966 Co-authored-by: Lukas Wirth <[email protected]>
| * Track labels in the HIRLukas Wirth2020-12-243-52/+78
| |
* | Implement const block inferenceLukas Wirth2020-12-232-1/+11
| |
* | Implement const pat inferenceLukas Wirth2020-12-232-4/+16
|/
* Merge #7010bors[bot]2020-12-231-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | 7010: Update ungrammar for const block patterns r=matklad a=Veykril Fixes #6848 Adds const blocks and const block patterns to the AST and parses them. Blocked on https://github.com/rust-analyzer/ungrammar/pull/17/, will merge that PR there once this one gets the OK so I can remove the local ungrammar dependency path and fix the Cargo.lock. Co-authored-by: Lukas Wirth <[email protected]>
| * 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