| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements a general truncation framework for HirFormatter
that keeps track of how much has been output so far. This information
can then be used to perform truncation inside the language server,
instead of relying on the client.
Initial support is implemented for truncating types hints using the
maxInlayHintLength server config option. The existing solution in the
VSCode extension has been removed in favor of letting the server
truncate type hints.
|
|
|
|
| |
See https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Exposing.20GenericParam.2Ename
|
|
|
|
| |
We can't really map arbitrary ranges, we only can map tokens
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
We need to be more careful now when substituting bound variables (previously, we
didn't have anything that used bound variables except Chalk, so it was not a
problem).
This is obviously quite ad-hoc; Chalk has more infrastructure for handling this
in a principled way, which we maybe should adopt.
|
| |
|
|
|
|
|
| |
Associated type values (in impls) are now a separate entity in Chalk, so we have
to intern separate IDs for them.
|
|\
| |
| |
| |
| |
| |
| |
| | |
2271: Force passing Source when creating a SourceAnalyzer r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
|
| | |
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
2268: Handle ast::MacroCall in classify_name and impl FromSource for MacroDef r=matklad a=kjeremy
Fixes #2260
Co-authored-by: kjeremy <[email protected]>
|
| |
| |
| |
| | |
Fixes #2260
|
| | |
|
|/ |
|
|
|
|
|
| |
If we want to support macros properly, we need to get rid of those
FileIds everywhere...
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
No need to store derivable info
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Unlike existing hir::GenericParams, this is a global ID.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
2200: Add variables to HIR r=matklad a=matklad
Introduce a `hir::Variable`, which should cover locals, parameters and `self`. Unlike `PatId`, variable knows it's owner so it is self-contained, and should be more convenient to use from `ra_ide_api`.
The goal here is to hide more details about `Body` from hir, which should make it easier to move `Body` into `hir_def`. I don't think that `ra_ide_api` intrracts with bodies directly at the moment anyway, but the glue layer is based basically on `ast::BindPat`, which seems pretty brittle.
Co-authored-by: Aleksey Kladov <[email protected]>
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
2205: Implement bulitin line! macro r=matklad a=edwin0cheng
This PR implements bulitin macro `line!` and add basic infra-structure for other bulitin macros:
1. Extend `MacroDefId` to support builtin macros
2. Add a `quote!` macro for simple quasi quoting.
Note that for support others builtin macros, eager macro expansion have to be supported first, this PR not try to handle it. :)
Co-authored-by: Edwin Cheng <[email protected]>
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
2179: Use HirDatabase to compute `is_deprecated` r=matklad a=martskins
This PR fixes #2167 by introducing `attributes_query` and adding `fn attrs(&self, def: crate::AttrDef) -> Option<Arc<[Attr]>>;` to the `DefDatabase` trait.
I'm a little concerned about the two spots in `attributes_query` where code is repeated, but I couldn't figure out a way to avoid that, so.. I welcome suggestions :smile:
Co-authored-by: Martin Asquino <[email protected]>
|
| | |
|