aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Make `impl_internable!` macro publicJonas Schievink2021-04-051-2/+7
| |
* | Merge #8245bors[bot]2021-04-051-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 TextRangeLukas Wirth2021-03-301-28/+14
| | |
| * | Implement basic Documentation source to syntax range mappingLukas Wirth2021-03-301-2/+107
| | |
* | | simplify visibility.rsJonas Schievink2021-04-051-3/+3
| | |
* | | Intern `GenericParams`Jonas Schievink2021-04-057-80/+44
| | | | | | | | | | | | | | | Also share the same instance between `ItemTree` and `generic_params` query.
* | | Add `GenericParams::shrink_to_fit`Jonas Schievink2021-04-052-0/+10
| | | | | | | | | | | | Reduces memory usage by over 10 MB
* | | Intern more `TypeRef`s in genericsJonas Schievink2021-04-053-9/+11
| | | | | | | | | | | | Saves ~3 MB
* | | Check if bitflags deps pulls its weightAleksey Kladov2021-04-043-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 #8324bors[bot]2021-04-041-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 Schievink2021-04-041-1/+11
| | | |
* | | | Only remember blocks that have a DefMapJonas Schievink2021-04-042-6/+8
|/ / /
* | | Merge #8322bors[bot]2021-04-042-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 methodJonas Schievink2021-04-042-2/+12
| | | |
* | | | Use exhaustive matches in shrink_to_fit implsJonas Schievink2021-04-042-13/+38
|/ / /
* | | Make `ast_to_token_tree` infallibleJonas Schievink2021-04-041-1/+1
| | | | | | | | | | | | It could never return `None`, so reflect that in the return type
* | | Use shrink_to_fit to reduce DefMap sizesJonas Schievink2021-04-033-1/+25
| | |
* | | Use bitflags to compress function propertiesJonas Schievink2021-04-033-53/+101
| | | | | | | | | | | | Very minor savings, only 1 MB or so
* | | Intern `ModPath` in `Import`Jonas Schievink2021-04-033-4/+8
| | | | | | | | | | | | Minor savings only
* | | Allow include! an empty content fileEdwin Cheng2021-04-032-0/+33
| | |
* | | Support `#[rustc_builtin_macro = "builtin_name"]`Jonas Schievink2021-04-031-1/+11
| | |
* | | Allow interning stringsJonas Schievink2021-04-031-9/+46
| | |
* | | Stop using an upgradeable read lock in interningJonas Schievink2021-04-021-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 DefMapsJonas Schievink2021-04-021-14/+16
| | |
* | | Remove `?Sized` on `PartialEq`/`Eq` implsJonas Schievink2021-04-021-3/+5
| | |
* | | Split `Intern::drop` into hot and cold pathJonas Schievink2021-04-021-16/+23
| | |
* | | Remove unnecessary region, relax `Sized` boundsJonas Schievink2021-04-011-16/+12
| | |
* | | Intern Attr, MacroCall and Path componentsJonas Schievink2021-04-017-17/+21
| | |
* | | Global TypeRef/TraitRef interningJonas Schievink2021-04-016-114/+197
| | |
* | | Fix block inner item defined in macroEdwin Cheng2021-03-311-0/+6
| | |
* | | Merge #8266bors[bot]2021-03-311-1/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8266: Fix generic arguments being incorrectly offset in qualified trait casts r=flodiebold a=Veykril We reverse the segments and generic args of the lowered path after building it, this wasn't accounted for when inserting the self parameter in `Type as Trait` segments. Fixes #5886 Co-authored-by: Lukas Wirth <[email protected]>
| * | | Fix generic arguments being incorrectly offset in qualified trait castsLukas Wirth2021-03-301-1/+3
| |/ /
* | | Remove TraitRef::ErrorLukas Wirth2021-03-292-13/+14
| | |
* | | Rename target_ty to self_tyLukas Wirth2021-03-293-6/+6
| | |
* | | Lower traits to TraitRef instead of TypeRefLukas Wirth2021-03-294-6/+68
|/ /
* | Remove unused test fixturesEdwin Cheng2021-03-281-4/+0
| |
* | Basic Support Macro 2.0Edwin Cheng2021-03-272-39/+85
|/
* Fix recursive macro statement expansionEdwin Cheng2021-03-254-52/+37
|
* Merge #7907bors[bot]2021-03-242-1/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7907: Autoderef with visibility r=cynecx a=cynecx Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7841. I am not sure about the general approach here. Right now this simply tries to check whether the autoderef candidate is reachable from the current module. ~~However this doesn't exactly work with traits (see the `tests::macros::infer_derive_clone_in_core` test, which fails right now).~~ see comment below Refs: - `rustc_typeck` checking fields: https://github.com/rust-lang/rust/blob/66ec64ccf31883cd2c28d045912a76179c0c6ed2/compiler/rustc_typeck/src/check/expr.rs#L1610 r? @flodiebold Co-authored-by: cynecx <[email protected]>
| * hir_def: move visibility queries from hir_ty to hir_defcynecx2021-03-242-1/+38
| |
* | Merge bang-macros and derives in name resolutionJonas Schievink2021-03-231-86/+79
| |
* | resolver: manually traverse nested block scopesJonas Schievink2021-03-223-5/+32
| |
* | Code review fixesKirill Bulatov2021-03-221-0/+2
| |
* | Do not revisit recursively imported modulesKirill Bulatov2021-03-211-7/+47
| |
* | Merge #8134bors[bot]2021-03-211-4/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | 8134: Correct the paths of submodules from the include! macro r=edwin0cheng a=sticnarf This PR should fix #7846. It mostly follows the instructions from @edwin0cheng in that issue. Co-authored-by: Yilin Chen <[email protected]>
| * | check is_include_macro only when attr_path is not specifiedYilin Chen2021-03-211-4/+3
| | | | | | | | | | | | Signed-off-by: Yilin Chen <[email protected]>
| * | use the included file as the source of expanded include macroYilin Chen2021-03-211-2/+8
| | | | | | | | | | | | Signed-off-by: Yilin Chen <[email protected]>
* | | Merge #8135bors[bot]2021-03-212-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8135: more clippy::{perf, complexity, style} fixes r=Veykril a=matthiaskrgr Co-authored-by: Matthias Krüger <[email protected]>
| * | | clippy::complexity simplifications related to IteratorsMatthias Krüger2021-03-211-1/+1
| | | |
| * | | remove more redundant clones (clippy::redundant_clone())Matthias Krüger2021-03-211-1/+1
| |/ /