Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | | Resolve prelude and crate root names in the root DefMap | Jonas Schievink | 2021-04-09 | 2 | -7/+34 | |
| | | | ||||||
| | | | ||||||
| \ \ | ||||||
*-. \ \ | Merge #8443 #8446 | bors[bot] | 2021-04-09 | 5 | -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 prelude | Jonas Schievink | 2021-04-09 | 1 | -9/+4 | |
| |/ / |/| | | | | | | | | | | | We don't populate the extern prelude for block DefMaps anymore, so this is unnecessary | |||||
| * | | Store `#[derive]` attribute ID along macro invoc | Jonas Schievink | 2021-04-09 | 3 | -9/+15 | |
| | | | ||||||
| * | | Rename `Attr`s `index` field to `id` | Jonas Schievink | 2021-04-09 | 1 | -8/+8 | |
| | | | ||||||
| * | | Add `AttrId` to track attribute sources | Jonas Schievink | 2021-04-09 | 1 | -14/+17 | |
|/ / | ||||||
* | | Use named fields in `MacroCallKind` | Jonas Schievink | 2021-04-08 | 3 | -17/+22 | |
| | | ||||||
* | | Track recursion limit when expanding custom derive | Jonas Schievink | 2021-04-08 | 1 | -1/+1 | |
|/ | ||||||
* | Update `OUT_DIR` diagnostic to match setting | Jonas Schievink | 2021-04-07 | 2 | -2/+2 | |
| | ||||||
* | Collect trait impls inside unnamed consts | Jonas Schievink | 2021-04-07 | 1 | -0/+4 | |
| | ||||||
* | nameres: collect unnamed consts | Jonas Schievink | 2021-04-07 | 2 | -14/+29 | |
| | ||||||
* | Avoid O(n²) when constructing AttrSourceMap | Jonas Schievink | 2021-04-06 | 3 | -10/+70 | |
| | ||||||
* | Lower attributes on tuple fields | Jonas Schievink | 2021-04-06 | 1 | -5/+4 | |
| | ||||||
* | infer: remove `record_field_resolutions` field | Jonas Schievink | 2021-04-06 | 1 | -0/+13 | |
| | | | | | It stores no useful data, since we can derive all fields from `variant_resolutions` | |||||
* | Intern TypeRefs stored in Body | Jonas Schievink | 2021-04-06 | 2 | -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 Macovei | 2021-04-06 | 3 | -6/+12 | |
| | | | | 64bit | |||||
* | Use Box'es to reduce size of hir_def::expr::Expr from 128 to 72 bytes (on ↵ | Alexandru Macovei | 2021-04-06 | 2 | -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 #8352 | bors[bot] | 2021-04-05 | 1 | -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]> | |||||
| * | Remove dead legacy macro expansion code | Brandon | 2021-04-05 | 1 | -9/+3 | |
| | | ||||||
* | | `Interned<T>`: Only hash the pointer | Jonas Schievink | 2021-04-05 | 1 | -2/+8 | |
| | | ||||||
* | | Make `impl_internable!` macro public | Jonas Schievink | 2021-04-05 | 1 | -2/+7 | |
| | | ||||||
* | | Merge #8245 | bors[bot] | 2021-04-05 | 1 | -2/+93 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8245: Properly resolve intra doc links in hover and goto_definition r=matklad a=Veykril Unfortunately involves a bit of weird workarounds due to pulldown_cmark's incorrect lifetimes on `BrokenLinkCallback`... I should probably open an issue there asking for the fixes to be pushed to a release since they already exist in the repo for quite some time it seems. Fixes #8258, Fixes #8238 Co-authored-by: Lukas Wirth <[email protected]> | |||||
| * | | Replace Range<usize> usage with TextRange | Lukas Wirth | 2021-03-30 | 1 | -28/+14 | |
| | | | ||||||
| * | | Implement basic Documentation source to syntax range mapping | Lukas Wirth | 2021-03-30 | 1 | -2/+107 | |
| | | | ||||||
* | | | simplify visibility.rs | Jonas Schievink | 2021-04-05 | 1 | -3/+3 | |
| | | | ||||||
* | | | Intern `GenericParams` | Jonas Schievink | 2021-04-05 | 7 | -80/+44 | |
| | | | | | | | | | | | | | | | Also share the same instance between `ItemTree` and `generic_params` query. | |||||
* | | | Add `GenericParams::shrink_to_fit` | Jonas Schievink | 2021-04-05 | 2 | -0/+10 | |
| | | | | | | | | | | | | Reduces memory usage by over 10 MB | |||||
* | | | Intern more `TypeRef`s in generics | Jonas Schievink | 2021-04-05 | 3 | -9/+11 | |
| | | | | | | | | | | | | Saves ~3 MB | |||||
* | | | Check if bitflags deps pulls its weight | Aleksey Kladov | 2021-04-04 | 3 | -32/+33 | |
| | | | | | | | | | | | | | | | | | | | | | | | | Bitflags is generally a good dependency -- it's lightweight, well maintained and embraced by the ecosystem. I wonder, however, do we really need it? Doesn't feel like it adds much to be honest. | |||||
* | | | Merge #8324 | bors[bot] | 2021-04-04 | 1 | -1/+11 | |
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8324: Add `Body::shrink_to_fit` r=jonas-schievink a=jonas-schievink Saves ~15 MB bors r+ Co-authored-by: Jonas Schievink <[email protected]> | |||||
| * | | | Add `Body::shrink_to_fit` | Jonas Schievink | 2021-04-04 | 1 | -1/+11 | |
| | | | | ||||||
* | | | | Only remember blocks that have a DefMap | Jonas Schievink | 2021-04-04 | 2 | -6/+8 | |
|/ / / | ||||||
* | | | Merge #8322 | bors[bot] | 2021-04-04 | 2 | -2/+12 | |
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8322: Access a body's block def maps via a method r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]> | |||||
| * | | | Access a body's block def maps via a method | Jonas Schievink | 2021-04-04 | 2 | -2/+12 | |
| | | | | ||||||
* | | | | Use exhaustive matches in shrink_to_fit impls | Jonas Schievink | 2021-04-04 | 2 | -13/+38 | |
|/ / / | ||||||
* | | | Make `ast_to_token_tree` infallible | Jonas Schievink | 2021-04-04 | 1 | -1/+1 | |
| | | | | | | | | | | | | It could never return `None`, so reflect that in the return type | |||||
* | | | Use shrink_to_fit to reduce DefMap sizes | Jonas Schievink | 2021-04-03 | 3 | -1/+25 | |
| | | | ||||||
* | | | Use bitflags to compress function properties | Jonas Schievink | 2021-04-03 | 3 | -53/+101 | |
| | | | | | | | | | | | | Very minor savings, only 1 MB or so | |||||
* | | | Intern `ModPath` in `Import` | Jonas Schievink | 2021-04-03 | 3 | -4/+8 | |
| | | | | | | | | | | | | Minor savings only | |||||
* | | | Allow include! an empty content file | Edwin Cheng | 2021-04-03 | 2 | -0/+33 | |
| | | | ||||||
* | | | Support `#[rustc_builtin_macro = "builtin_name"]` | Jonas Schievink | 2021-04-03 | 1 | -1/+11 | |
| | | | ||||||
* | | | Allow interning strings | Jonas Schievink | 2021-04-03 | 1 | -9/+46 | |
| | | | ||||||
* | | | Stop using an upgradeable read lock in interning | Jonas Schievink | 2021-04-02 | 1 | -5/+2 | |
| | | | | | | | | | | | | | | | | | | Only one upgradeable read lock can be handed out at the same time, and we never acquire a non-upgradeable read lock, so this has no benefit over just using a write lock in the first place. | |||||
* | | | Only populate prelude for crate-level DefMaps | Jonas Schievink | 2021-04-02 | 1 | -14/+16 | |
| | | | ||||||
* | | | Remove `?Sized` on `PartialEq`/`Eq` impls | Jonas Schievink | 2021-04-02 | 1 | -3/+5 | |
| | | | ||||||
* | | | Split `Intern::drop` into hot and cold path | Jonas Schievink | 2021-04-02 | 1 | -16/+23 | |
| | | | ||||||
* | | | Remove unnecessary region, relax `Sized` bounds | Jonas Schievink | 2021-04-01 | 1 | -16/+12 | |
| | | | ||||||
* | | | Intern Attr, MacroCall and Path components | Jonas Schievink | 2021-04-01 | 7 | -17/+21 | |
| | | | ||||||
* | | | Global TypeRef/TraitRef interning | Jonas Schievink | 2021-04-01 | 6 | -114/+197 | |
| | | | ||||||
* | | | Fix block inner item defined in macro | Edwin Cheng | 2021-03-31 | 1 | -0/+6 | |
| | | |