about summary refs log tree commit diff
path: root/xtask
AgeCommit message (Collapse)AuthorLines
2020-05-06RegenerateAleksey Kladov-4/+4
2020-05-05Rename AtomTextEdit -> IndelAleksey Kladov-1/+0
2020-05-05Rename ImplItem to AssocItemEdwin Cheng-2/+2
2020-05-03Add documents owner for ImplDef and SourceFileEdwin Cheng-2/+2
2020-05-02Introduce EffectExprAleksey Kladov-12/+8
2020-05-02Revert "Merge #4233"Aleksey Kladov-1/+4
This reverts commit a5f2b16366f027ad60c58266a66eb7fbdcbda9f9, reversing changes made to c96b2180c1c4206a0a98c280b4d30897eb116336.
2020-05-01Merge #4246bors[bot]-1/+1
4246: Validate uses of self and super r=matklad a=djrenren This change follows on the validation of the `crate` keyword in paths. It verifies the following things: `super`: - May only be preceded by other `super` segments - If in a `UseItem` then all semantically preceding paths also consist only of `super` `self` - May only be the start of a path Just a note, a couple times while working on this I found myself really wanting a Visitor of some sort so that I could traverse descendants while skipping sub-trees that are unimportant. Iterators don't really work for this, so as you can see I reached for recursion. Considering paths are generally small a fancy debounced visitor probably isn't important but figured I'd say something in case we had something like this lying around and I wasn't using it. Co-authored-by: John Renner <john@jrenner.net>
2020-05-01Validate uses of self and superJohn Renner-1/+1
2020-04-30Remove dead code, which elaborately pretends to be aliveAleksey Kladov-4/+1
2020-04-30Fix a bunch of false-positives in join-linesAleksey Kladov-1/+1
2020-04-30Allow to set env vars and pipe stdin via not_bashAleksey Kladov-92/+79
2020-04-30Merge #4219bors[bot]-33/+67
4219: Avoid `rustup` invocation for non-rustup rust installation r=matklad a=oxalica Fix #4218 and #3243. Co-authored-by: oxalica <oxalicc@pm.me>
2020-04-30Merge #4178bors[bot]-1/+1
4178: Validate the location of `crate` in paths r=matklad a=djrenren **This solution does not fully handle `use` statements. See below** This pull requests implements simple validation of usages of the `crate` keyword in `Path`s. Specifically it validates that: - If a `PathSegment` is starts with the `crate` keyword, it is also the first segment of the `Path` - All other usages of `crate` in `Path`s are considered errors. This aligns with `rustc`'s rules. Unlike rustc this implementation does not issue a special error message in the case of `::crate` but it does catch the error. Furthermore, this change does not cover all error cases. Specifically the following is not caught: ```rust use foo::{crate} ``` This is because this check is context sensitive. From an AST perspective, `crate` is the root of the `Path`. Only by inspecting the full `UseItem` do we see that it is not in fact the root. This problem becomes worse because `UseTree`s are allowed to be arbitrarily nested: ```rust use {crate, {{crate, foo::{crate}}} ``` So this is a hard problem to solve without essentially a breadth-first search. In a traditional compiler, I'd say this error is most easily found during the AST -> HIR conversion pass but within rust-analyzer I'm not sure where it belongs. Under the implementation in this PR, such errors are ignored so we're *more correct* just not *entirely correct*. Co-authored-by: John Renner <john@jrenner.net>
2020-04-30Avoid `rustup` invocation for non-rustup rust installationoxalica-33/+67
2020-04-29Validate the location of `crate` in pathsJohn Renner-1/+1
2020-04-28Use x86_64-unknown-linux-gnu for releasesLaurențiu Nicola-5/+3
2020-04-23Bump required rust to 1.43kjeremy-1/+1
2020-04-18Group generated ast boilerplate apart from the interesting partveetaha-120/+130
2020-04-18Refucktor codegenveetaha-6/+6
2020-04-17tests: add more info about what failed in tidy testsBenjamin Coenen-3/+3
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-13Change add_function assist to use todo!()Timo Freiberg-0/+1
2020-04-12Align grammar for record patterns and literalsAleksey Kladov-1/+1
The grammar now looks like this [name_ref :] pat
2020-04-10Change missing impl assist to use todo!() instead of unimplemented()Chris Hopman-1/+10
todo!() "Indicates unfinished code" (https://doc.rust-lang.org/std/macro.todo.html) Rust documentation provides further clarification: > The difference between unimplemented! and todo! is that while todo! > conveys an intent of implementing the functionality later and the > message is "not yet implemented", unimplemented! makes no such claims. todo!() seems more appropriate for assists that insert missing impls.
2020-04-10SimplifyAleksey Kladov-1/+1
2020-04-10Rename some tokensAleksey Kladov-13/+13
2020-04-10Better readabilityAleksey Kladov-2/+3
2020-04-10Remove dead codeAleksey Kladov-11/+4
2020-04-10Generate only minimal set of ineresting tokensAleksey Kladov-0/+38
2020-04-10Scale token generation backAleksey Kladov-238/+59
2020-04-10Convert more tokensAleksey Kladov-49/+19
2020-04-10Other delimitersAleksey Kladov-18/+22
2020-04-10Curley tokensAleksey Kladov-17/+15
2020-04-10Start replacing tokensAleksey Kladov-1/+5
2020-04-10Semicolon tokenAleksey Kladov-13/+19
2020-04-10More readable ast_src for keywordsAleksey Kladov-104/+133
2020-04-10SimplifyAleksey Kladov-4/+4
2020-04-09Simpler acessors for keywordsAleksey Kladov-10/+27
2020-04-09Drop needless traitAleksey Kladov-4/+4
2020-04-09Be consistent about token accesorsAleksey Kladov-2/+3
2020-04-09Add _token suffix to token accessorsAleksey Kladov-0/+1
I think this makes is more clear which things are : AstNode and which are : AstToken
2020-04-09Put displays at the endAleksey Kladov-12/+16
2020-04-09More compactAleksey Kladov-10/+2
2020-04-09More compact generated codeAleksey Kladov-0/+1
2020-04-09Move the rest of the tokens to generated/tokensAleksey Kladov-85/+98
2020-04-09Move generated tokens to a separate fileAleksey Kladov-37/+61
2020-04-09Start ast/generated/tokensAleksey Kladov-3/+8
2020-04-09Prepare for spliting generated into tokens and nodesAleksey Kladov-2/+2
2020-04-09Reduce visibilityAleksey Kladov-2/+2
2020-04-09Cleanup importAleksey Kladov-2/+5
2020-04-09Scale back to only two traitsAleksey Kladov-37/+58