Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Merge #4219 | bors[bot] | 2020-04-30 | 1 | -33/+67 | |
|\ | | | | | | | | | | | | | | | | | | | 4219: Avoid `rustup` invocation for non-rustup rust installation r=matklad a=oxalica Fix #4218 and #3243. Co-authored-by: oxalica <[email protected]> | |||||
| * | Avoid `rustup` invocation for non-rustup rust installation | oxalica | 2020-04-30 | 1 | -33/+67 | |
| | | ||||||
* | | Merge #4178 | bors[bot] | 2020-04-30 | 1 | -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 <[email protected]> | |||||
| * | Validate the location of `crate` in paths | John Renner | 2020-04-29 | 1 | -1/+1 | |
| | | ||||||
* | | Use x86_64-unknown-linux-gnu for releases | Laurențiu Nicola | 2020-04-28 | 1 | -5/+3 | |
|/ | ||||||
* | Bump required rust to 1.43 | kjeremy | 2020-04-23 | 1 | -1/+1 | |
| | ||||||
* | Group generated ast boilerplate apart from the interesting part | veetaha | 2020-04-18 | 1 | -120/+130 | |
| | ||||||
* | Refucktor codegen | veetaha | 2020-04-18 | 1 | -6/+6 | |
| | ||||||
* | Align grammar for record patterns and literals | Aleksey Kladov | 2020-04-11 | 1 | -1/+1 | |
| | | | | | | The grammar now looks like this [name_ref :] pat | |||||
* | Simplify | Aleksey Kladov | 2020-04-10 | 1 | -1/+1 | |
| | ||||||
* | Rename some tokens | Aleksey Kladov | 2020-04-10 | 2 | -13/+13 | |
| | ||||||
* | Better readability | Aleksey Kladov | 2020-04-10 | 1 | -2/+3 | |
| | ||||||
* | Remove dead code | Aleksey Kladov | 2020-04-10 | 1 | -11/+4 | |
| | ||||||
* | Generate only minimal set of ineresting tokens | Aleksey Kladov | 2020-04-10 | 3 | -0/+38 | |
| | ||||||
* | Scale token generation back | Aleksey Kladov | 2020-04-10 | 3 | -238/+59 | |
| | ||||||
* | Convert more tokens | Aleksey Kladov | 2020-04-10 | 2 | -49/+19 | |
| | ||||||
* | Other delimiters | Aleksey Kladov | 2020-04-10 | 2 | -18/+22 | |
| | ||||||
* | Curley tokens | Aleksey Kladov | 2020-04-10 | 1 | -17/+15 | |
| | ||||||
* | Start replacing tokens | Aleksey Kladov | 2020-04-10 | 2 | -1/+5 | |
| | ||||||
* | Semicolon token | Aleksey Kladov | 2020-04-10 | 2 | -13/+19 | |
| | ||||||
* | More readable ast_src for keywords | Aleksey Kladov | 2020-04-10 | 2 | -104/+133 | |
| | ||||||
* | Simplify | Aleksey Kladov | 2020-04-10 | 1 | -4/+4 | |
| | ||||||
* | Simpler acessors for keywords | Aleksey Kladov | 2020-04-09 | 2 | -10/+27 | |
| | ||||||
* | Drop needless trait | Aleksey Kladov | 2020-04-09 | 1 | -4/+4 | |
| | ||||||
* | Be consistent about token accesors | Aleksey Kladov | 2020-04-09 | 1 | -2/+3 | |
| | ||||||
* | Add _token suffix to token accessors | Aleksey Kladov | 2020-04-09 | 1 | -0/+1 | |
| | | | | | I think this makes is more clear which things are : AstNode and which are : AstToken | |||||
* | Put displays at the end | Aleksey Kladov | 2020-04-09 | 1 | -12/+16 | |
| | ||||||
* | More compact | Aleksey Kladov | 2020-04-09 | 1 | -10/+2 | |
| | ||||||
* | More compact generated code | Aleksey Kladov | 2020-04-09 | 1 | -0/+1 | |
| | ||||||
* | Move the rest of the tokens to generated/tokens | Aleksey Kladov | 2020-04-09 | 2 | -85/+98 | |
| | ||||||
* | Move generated tokens to a separate file | Aleksey Kladov | 2020-04-09 | 1 | -37/+61 | |
| | ||||||
* | Start ast/generated/tokens | Aleksey Kladov | 2020-04-09 | 2 | -3/+8 | |
| | ||||||
* | Prepare for spliting generated into tokens and nodes | Aleksey Kladov | 2020-04-09 | 2 | -2/+2 | |
| | ||||||
* | Reduce visibility | Aleksey Kladov | 2020-04-09 | 1 | -2/+2 | |
| | ||||||
* | Cleanup import | Aleksey Kladov | 2020-04-09 | 1 | -2/+5 | |
| | ||||||
* | Scale back to only two traits | Aleksey Kladov | 2020-04-09 | 2 | -37/+58 | |
| | ||||||
* | Provide more complete AST accessors to support usage in rustc | Luca Barbieri | 2020-04-09 | 1 | -91/+292 | |
| | ||||||
* | Scale back the traits | Aleksey Kladov | 2020-04-09 | 1 | -140/+28 | |
| | ||||||
* | Add AstElement trait, generate tokens, support tokens in enums | Luca Barbieri | 2020-04-08 | 1 | -29/+269 | |
| | | | | | | | | | - Adds a new AstElement trait that is implemented by all generated node, token and enum structs - Overhauls the code generators to code-generate all tokens, and also enhances enums to support including tokens, node, and nested enums | |||||
* | fmt | Aleksey Kladov | 2020-04-08 | 1 | -1/+0 | |
| | ||||||
* | Don't strip nightly releases | Aleksey Kladov | 2020-04-08 | 4 | -22/+19 | |
| | ||||||
* | When making a release, just promote the latest nightly | Aleksey Kladov | 2020-04-07 | 1 | -2/+2 | |
| | ||||||
* | Macro patterns are not confused with expressions. | Aleksey Kladov | 2020-04-03 | 1 | -0/+3 | |
| | | | | | | | | | | | We treat macro calls as expressions (there's appropriate Into impl), which causes problem if there's expresison and non-expression macro in the same node (like in the match arm). We fix this problem by nesting macor patterns into another node (the same way we nest path into PathExpr or PathPat). Ideally, we probably should add a similar nesting for macro expressions, but that needs some careful thinking about macros in blocks: `{ am_i_expression!() }`. | |||||
* | Get rid of ItemOrMacro | Aleksey Kladov | 2020-03-26 | 1 | -0/+1 | |
| | ||||||
* | Fix formatting | Aleksey Kladov | 2020-03-23 | 2 | -2/+2 | |
| | ||||||
* | Fix release | Aleksey Kladov | 2020-03-23 | 2 | -7/+18 | |
| | ||||||
* | gen_assists_docs skip hidden files | Josh Mcguigan | 2020-03-21 | 2 | -7/+19 | |
| | ||||||
* | Make from-source install use cargo installed binary by default | Aleksey Kladov | 2020-03-20 | 2 | -12/+1 | |
| | ||||||
* | Simplify extension tag sniffing | Aleksey Kladov | 2020-03-19 | 2 | -15/+13 | |
| | ||||||
* | Make xtask dist more reliable | Aleksey Kladov | 2020-03-18 | 1 | -12/+29 | |
| |