aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch to the new location for implsAleksey Kladov2019-12-123-5/+10
|
* Build correct SourceAnalyzer for traitsAleksey Kladov2019-12-101-14/+4
|
* Remove one more TyAleksey Kladov2019-12-082-7/+2
|
* Remove more dead codeAleksey Kladov2019-12-082-96/+0
|
* Cleanup module structureAleksey Kladov2019-12-083-8/+7
|
* Remove dead codeAleksey Kladov2019-12-081-33/+0
|
* Remove ty from code_modelAleksey Kladov2019-12-085-49/+36
|
* Remove bodies from code_modelAleksey Kladov2019-12-081-9/+0
|
* remove `infer` method from CodeModelAleksey Kladov2019-12-081-14/+2
|
* Drop some unused methodsAleksey Kladov2019-12-082-49/+5
|
* Cleanup Field tyAleksey Kladov2019-12-081-10/+21
|
* Cleanup Crate APIAleksey Kladov2019-12-084-22/+36
|
* Remove MacroFileKindEdwin Cheng2019-12-081-39/+2
|
* Discover type parameters in more casesAleksey Kladov2019-12-071-0/+5
|
* Rename GenericParam -> TypeParamAleksey Kladov2019-12-075-23/+23
| | | | We don't have LifetimeParam yet, but they are planned!
* Get the right analyzer for implsAleksey Kladov2019-12-071-1/+5
|
* Classify name works for TypeParamsAleksey Kladov2019-12-072-3/+24
|
* ToNav for GenericParamAleksey Kladov2019-12-071-0/+7
|
* Track source of type parametersAleksey Kladov2019-12-071-2/+10
|
* Remove idx and parent generics from genericsAleksey Kladov2019-12-072-11/+4
| | | | | This makes `hir_def::GenericParams` flatter. The logic for re-numbering the params is moved to hir instead.
* Merge #2489bors[bot]2019-12-061-5/+7
|\ | | | | | | | | | | | | | | | | | | | | | | 2489: Implement `format_args` r=flodiebold a=flodiebold This fixes a huge amount of type mismatches (because every format call was a type mismatch so far); I also hoped to get go to def working within `format!` etc., and the test says it should, but in practice it still doesn't seem to... Also remove the `len` parameter from `Name::new_inline_ascii`, which I'm assuming was only there because of `const fn` limitations? cc @edwin0cheng Co-authored-by: Florian Diebold <[email protected]>
| * Implement ancestors_with_macros in a better wayFlorian Diebold2019-12-061-12/+1
| |
| * Try to make go to definition work in format!Florian Diebold2019-12-061-5/+18
| | | | | | | | | | | | | | SourceAnalyzer didn't work properly within expression macro expansions because it didn't find the enclosing function. Fix this by going up the expansion chain to find ancestors. This makes the test work, but apparently in real usage it's still not working.
* | DynMapAleksey Kladov2019-12-061-36/+38
|/ | | | | This might, or might not help us to reduce boilerplate associated with plumbing values from analysis to the IDE layer
* Merge #2479bors[bot]2019-12-053-5/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2479: Add expansion infrastructure for derive macros r=matklad a=flodiebold I thought I'd experiment a bit with attribute macro/derive expansion, and here's what I've got so far. It has dummy implementations of the Copy / Clone derives, to show that the approach works; it doesn't add any attribute macro support, but I think that fits into the architecture. Basically, during raw item collection, we look at the attributes and generate macro calls for them if necessary. Currently I only do this for derives, and just add the derive macro calls as separate calls next to the item. I think for derives, it's important that they don't obscure the actual item, since they can't actually change it (e.g. sending the item token tree through macro expansion unnecessarily might make completion within it more complicated). Attribute macros would have to be recognized at that stage and replace the item (i.e., the raw item collector will just emit an attribute macro call, and not the item). I think when we implement this, we should try to recognize known inert attributes, so that we don't do macro expansion unnecessarily; anything that isn't known needs to be treated as a possible attribute macro call (since the raw item collector can't resolve the macro yet). There's basically no name resolution for attribute macros implemented, I just hardcoded the built-in derives. In the future, the built-ins should work within the normal name resolution infrastructure; the problem there is that the builtin stubs in `std` use macros 2.0, which we don't support yet (and adding support is outside the scope of this). One aspect that I don't really have a solution for, but I don't know how important it is, is removing the attribute itself from its input. I'm pretty sure rustc leaves out the attribute macro from the input, but to do that, we'd have to create a completely new syntax node. I guess we could do it when / after converting to a token tree. Co-authored-by: Florian Diebold <[email protected]>
| * Add expansion infrastructure for derive macrosFlorian Diebold2019-12-053-5/+9
| |
* | Reduce copy-pasteAleksey Kladov2019-12-051-20/+30
| |
* | Introduce ChildFromSourceAleksey Kladov2019-12-051-101/+40
|/
* One pub function less is good!ice10002019-12-051-5/+4
|
* No block at the momentice10002019-12-041-1/+1
|
* Remove almost unused `ModuleSource::new`ice10002019-12-041-1/+1
|
* Confluent `ModuleSource` usageice10002019-12-041-5/+1
|
* Add `ModuleSource::Block`ice10002019-12-045-69/+15
|
* Replace `ra_hir_expand::either` with crateice10002019-12-034-12/+16
|
* Add BuiltinShadowModeEdwin Cheng2019-11-301-1/+1
|
* Move source-related traits to a separate moduleAleksey Kladov2019-11-281-1/+4
|
* Use InFile for AstIdAleksey Kladov2019-11-281-1/+1
|
* Rename Source -> InFileAleksey Kladov2019-11-285-67/+67
|
* Use Name::missing consistentlyAleksey Kladov2019-11-271-10/+7
|
* Minimize APIAleksey Kladov2019-11-271-8/+1
|
* ReformatAleksey Kladov2019-11-271-6/+5
|
* Rename module_id -> local_idAleksey Kladov2019-11-273-16/+16
|
* Move TyAleksey Kladov2019-11-2728-12229/+46
|
* DecoupleAleksey Kladov2019-11-271-20/+15
|
* Remove TypableDefAleksey Kladov2019-11-274-98/+7
|
* Cleanup importsAleksey Kladov2019-11-272-3/+3
|
* Use Id for variatsAleksey Kladov2019-11-277-52/+60
|
* More decouplingAleksey Kladov2019-11-274-33/+27
|
* Decouple moreAleksey Kladov2019-11-275-40/+41
|
* DecoupleAleksey Kladov2019-11-272-24/+32
|