Commit graph

294 commits

Author SHA1 Message Date
Aleksey Kladov
239a6012eb Check licenses 2020-07-14 17:14:00 +02:00
Yuki Okushi
6f423466d1
Add a license field to all the crates 2020-07-14 10:57:26 +09:00
Aleksey Kladov
6db29e6b8d Prefill reviewer 2020-07-13 15:35:52 +02:00
Aleksey Kladov
e4b4600752 better language 2020-07-08 22:47:50 +02:00
Veetaha
f92bfb5807 Gzip artifacts
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>

Override miniz_oxide to build it with optimizations

Building this crate with optimizations decreases the gzipping
part of `cargo xtask dist` from `30-40s` down to `3s`,
the overhead for `rustc` to apply optimizations is miserable on this background
2020-07-07 23:30:11 +03:00
Aleksey Kladov
a614d84ff4 Automate rust-analyzer promotion 2020-07-07 18:38:34 +02:00
Aleksey Kladov
faa65d7856 . 2020-07-07 18:12:22 +02:00
Aleksey Kladov
a92b76d823 sponsors link 2020-07-06 17:13:08 +02:00
Aleksey Kladov
66b6a433c6 Unify naming of generating assists 2020-07-03 19:32:18 +02:00
Aleksey Kladov
4b17a90c41 Add sponsors section to changelog 2020-06-22 15:11:22 +02:00
bors[bot]
f3d73865d6
Merge #4855
4855: Use more idiomatic style for lifetimes in generated code r=matklad a=Veetaha



Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-06-12 12:49:30 +00:00
Veetaha
4fefc7d06c Simplify 2020-06-12 02:56:06 +03:00
Veetaha
33e009ec42 Use more idiomatic style for lifetimes in generated code 2020-06-12 01:23:04 +03:00
Matthew Jasper
506e1ddbfa Separating parsing of for in predicates and types 2020-06-10 11:30:58 +01:00
Aleksey Kladov
cbc5eb8738 Refactor 2020-06-08 14:05:14 +02:00
Aleksey Kladov
97ea2dfc4b Move to a dedicated file 2020-06-08 13:58:54 +02:00
Aleksey Kladov
5315934d88 Don't store generated docs in the repo 2020-06-03 18:26:50 +02:00
veetaha
f2f3c554af Don't exclude dirs that appear in project root parent path 2020-06-02 23:15:23 +03:00
bors[bot]
62564008f7
Merge #4672
4672: Link docs and code r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-05-31 13:36:52 +00:00
Aleksey Kladov
899570ad7a Link to the specific source line 2020-05-31 15:36:20 +02:00
bors[bot]
d96f3368d6
Merge #4670
4670: Move assists documentation into the manual r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-05-31 13:03:55 +00:00
Aleksey Kladov
46292c7cec Move assists documentation into the manual 2020-05-31 15:02:12 +02:00
bors[bot]
5579ba8af5
Merge #4667
4667: Infer labelled breaks correctly r=flodiebold a=robojumper

Fixes #4663.

Co-authored-by: robojumper <robojumper@gmail.com>
2020-05-31 12:03:24 +00:00
Aleksey Kladov
5a2f4548e5 Rename user/readme.adoc -> user/manual.adoc 2020-05-31 13:22:02 +02:00
Aleksey Kladov
13a996f3b6 Force / slashes on windows 2020-05-31 12:49:06 +02:00
Aleksey Kladov
7e3ee77c83 Tweak whitespace 2020-05-31 12:12:41 +02:00
robojumper
1cd78a3355 correctly infer labelled breaks 2020-05-31 11:40:18 +02:00
Aleksey Kladov
1c6a2eb14a Move the rest of the features to generated docs 2020-05-31 11:29:19 +02:00
Aleksey Kladov
8915183d7d Don't require module docs for Features and Assists 2020-05-31 09:59:38 +02:00
Aleksey Kladov
f593393ebb Specify actions 2020-05-31 09:45:41 +02:00
Aleksey Kladov
5dd6549569 Simplify 2020-05-31 09:28:53 +02:00
Aleksey Kladov
c8f27a4a88 Generate features docs from source 2020-05-31 01:54:54 +02:00
Aleksey Kladov
383247a9ae Generalize 2020-05-31 00:33:37 +02:00
Aleksey Kladov
e1829d8959 minor 2020-05-30 23:57:16 +02:00
robojumper
367487fe88 Support raw_ref_op's raw reference operator 2020-05-28 21:42:22 +02:00
Aleksey Kladov
80545e5d3a New assist: add turbo fish 2020-05-20 00:27:10 +02:00
veetaha
b22cf23ad1 Convert TODO about ParamList used in closures to a FIXME
cc @matklad (you didn't comment on this one)
2020-05-12 23:58:51 +03:00
veetaha
8d4c11625a Remove an equals sign from ConstArg (this probably pertains only to ConstParam)
(As per matklad)
2020-05-12 23:57:04 +03:00
veetaha
b31475d316 Remove a comment on NameRefToken as per matklad 2020-05-12 23:55:46 +03:00
veetaha
fcd11dd1a8 Convert TODO to a FIXME as per matklad 2020-05-12 23:54:40 +03:00
veetaha
51edfbaffe Convert TODO to a Note(matklad) 2020-05-12 23:50:52 +03:00
veetaha
65b380fa8d Convert to TODOs to FIXMEs as per matklad 2020-05-12 23:48:04 +03:00
veetaha
55a29982c0 Revert "Remove MacroStmts as per edwin0cheng" (cc @edwin0cheng) and add a fixme to document it.
This reverts commit 7a49165f5d.
MacroStmts ast node is not used by itself, but it pertains
to SyntaxNodeKind MACRO_STMTS that is used by ra_paser, so
even tho the node itself is not used, it is better to keep it
with a FIXME to actually add a doc comment when it becomes useful.
2020-05-12 23:45:29 +03:00
veetaha
24b27abf9f Add a doc comment on the difference between Name and NameRef ast nodes 2020-05-12 23:31:37 +03:00
veetaha
2a5ab9f5dd Resolve TODO about macro 2.0 def 2020-05-10 22:08:06 +03:00
veetaha
73c6bc4dbd Fix typo 2020-05-10 21:59:15 +03:00
veetaha
33f240960d Carify on a semicolon in macro call 2020-05-10 21:57:49 +03:00
veetaha
a1dc28f236 Resolve TODO about curly-braced constructions in expression statement 2020-05-10 21:51:53 +03:00
veetaha
1677f35ef1 Remove TODO about Block since it was removed 2020-05-10 21:46:26 +03:00
veetaha
8a298eed7a Resolve todos about refs and empty statements 2020-05-10 21:44:14 +03:00
veetaha
f5e2e02aa9 Converted TODO about MacroItems to FIXME as per edwin0cheng 2020-05-10 21:06:12 +03:00
veetaha
71f2be968b Verified ConstArg example, waiting for response on what = sign pertains to 2020-05-10 21:02:21 +03:00
veetaha
f6fd4c4a74 Correcy use tree and type args docs 2020-05-10 20:52:25 +03:00
veetaha
2af6b4b67e Correct use cannot have type args as per flodiebold 2020-05-10 20:23:29 +03:00
veetaha
a19b164661 Correct path docs and add colon2 token to Path ast node 2020-05-10 20:21:46 +03:00
veetaha
eedf11ae88 Add example with const in TypeBound as per flodiebold 2020-05-10 19:24:06 +03:00
veetaha
5707c2d7a6 Remove todo comment about arg vs param difference as per clarification from flodiebold 2020-05-10 19:19:56 +03:00
veetaha
09c438b47e Properly document const impl as per flodiebold 2020-05-10 19:17:46 +03:00
veetaha
80c529d1dc Remove on TypeAliasDef as per flodiebold 2020-05-10 19:15:04 +03:00
veetaha
7a49165f5d Remove MacroStmts as per edwin0cheng 2020-05-10 19:11:22 +03:00
veetaha
258a3461b4 Add proper docs for TokenTree as per edwin0cheng 2020-05-10 19:09:36 +03:00
veetaha
e0e384a34a Add ast docs to codegen script 2020-05-10 19:05:51 +03:00
Timo Freiberg
8a5d14453e Add fixture doc comment 2020-05-06 18:09:28 +02:00
Aleksey Kladov
845d47759e Simplify tidy tests 2020-05-06 10:25:34 +02:00
Aleksey Kladov
eea431180e Regenerate 2020-05-06 10:21:35 +02:00
Aleksey Kladov
4a6fa8f0df Rename AtomTextEdit -> Indel 2020-05-05 23:15:49 +02:00
Edwin Cheng
92665358cd Rename ImplItem to AssocItem 2020-05-05 23:56:10 +08:00
Edwin Cheng
f90fbaf6a6 Add documents owner for ImplDef and SourceFile 2020-05-03 18:00:27 +08:00
Aleksey Kladov
4f2134cc33 Introduce EffectExpr 2020-05-02 11:21:39 +02:00
Aleksey Kladov
fd030f9450 Revert "Merge #4233"
This reverts commit a5f2b16366, reversing
changes made to c96b2180c1.
2020-05-02 01:12:37 +02:00
bors[bot]
21588e15df
Merge #4246
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-01 19:24:25 +00:00
John Renner
3bb46042fb Validate uses of self and super 2020-05-01 08:59:24 -07:00
Aleksey Kladov
292ba6a1f8 Remove dead code, which elaborately pretends to be alive 2020-04-30 22:41:14 +02:00
Aleksey Kladov
15cfa9a808 Fix a bunch of false-positives in join-lines 2020-04-30 22:08:50 +02:00
Aleksey Kladov
5f0008040e Allow to set env vars and pipe stdin via not_bash 2020-04-30 15:20:47 +02:00
bors[bot]
36775ef0d0
Merge #4219
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-30 11:59:29 +00:00
bors[bot]
95e8766db6
Merge #4178
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-30 10:17:40 +00:00
oxalica
a1e84516e8
Avoid rustup invocation for non-rustup rust installation 2020-04-30 17:53:38 +08:00
John Renner
0af727da91 Validate the location of crate in paths 2020-04-29 11:06:51 -07:00
Laurențiu Nicola
77de40192e Use x86_64-unknown-linux-gnu for releases 2020-04-28 20:47:13 +03:00
kjeremy
4378c63272 Bump required rust to 1.43 2020-04-23 11:56:32 -04:00
veetaha
972d3b2ba3 Group generated ast boilerplate apart from the interesting part 2020-04-18 23:51:13 +03:00
veetaha
21b98d585e Refucktor codegen 2020-04-18 21:46:24 +03:00
Benjamin Coenen
828f69ce54 tests: add more info about what failed in tidy tests
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-17 10:32:12 +02:00
Timo Freiberg
1231418f31 Change add_function assist to use todo!() 2020-04-13 22:17:06 +02:00
Aleksey Kladov
5e5eb6a108 Align grammar for record patterns and literals
The grammar now looks like this

   [name_ref :] pat
2020-04-12 00:00:15 +02:00
Chris Hopman
af04d45d32 Change missing impl assist to use todo!() instead of unimplemented()
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-10 13:56:12 -07:00
Aleksey Kladov
c476742f47 Simplify 2020-04-10 17:47:49 +02:00
Aleksey Kladov
5c5bde47fb Rename some tokens 2020-04-10 17:07:09 +02:00
Aleksey Kladov
d4332760d8 Better readability 2020-04-10 16:10:28 +02:00
Aleksey Kladov
e0f02d233f Remove dead code 2020-04-10 16:10:28 +02:00
Aleksey Kladov
4560fe2abf Generate only minimal set of ineresting tokens 2020-04-10 16:10:28 +02:00
Aleksey Kladov
8d71a6bf0c Scale token generation back 2020-04-10 16:10:28 +02:00
Aleksey Kladov
779f06ed77 Convert more tokens 2020-04-10 16:10:28 +02:00
Aleksey Kladov
548f562dda Other delimiters 2020-04-10 16:10:28 +02:00
Aleksey Kladov
460c8bbdec Curley tokens 2020-04-10 16:10:28 +02:00
Aleksey Kladov
1c5d859195 Start replacing tokens 2020-04-10 16:10:28 +02:00
Aleksey Kladov
c8b4c36f81 Semicolon token 2020-04-10 16:10:28 +02:00
Aleksey Kladov
f89f2e3885 More readable ast_src for keywords 2020-04-10 16:10:28 +02:00
Aleksey Kladov
ff5643c524 Simplify 2020-04-10 16:10:27 +02:00