]>
git.lizzy.rs Git - rust.git/log
bors[bot] [Tue, 8 Oct 2019 08:44:26 +0000 (08:44 +0000)]
Merge #1951
1951: Lower the precedence of the `as` operator. r=matklad a=goffrie
Previously, the `as` operator was being parsed like a postfix expression, and
therefore being given the highest possible precedence. That caused it to bind
more tightly than prefix operators, which it should not. Instead, parse it
somewhat like a normal binary expression with some special-casing.
Fixes #1851.
Co-authored-by: Geoffry Song <goffrie@gmail.com>
bors[bot] [Tue, 8 Oct 2019 06:35:52 +0000 (06:35 +0000)]
Merge #1966
1966: use lockfile in cargo install r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 8 Oct 2019 06:35:27 +0000 (09:35 +0300)]
use lockfile in cargo install
bors[bot] [Mon, 7 Oct 2019 13:43:43 +0000 (13:43 +0000)]
Merge #1963
1963: proc-macro2 1.0.5 r=matklad a=kjeremy
Has performance improvements. See https://github.com/alexcrichton/proc-macro2/issues/198
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Mon, 7 Oct 2019 13:35:08 +0000 (09:35 -0400)]
proc-macro2 1.0.5
Geoffry Song [Sat, 5 Oct 2019 23:30:10 +0000 (16:30 -0700)]
Move tests around
bors[bot] [Sat, 5 Oct 2019 14:54:25 +0000 (14:54 +0000)]
Merge #1960
1960: Replace AST visitors with macro r=viorina a=viorina
Fixes #1672.
Co-authored-by: Ekaterina Babshukova <ekaterina.babshukova@yandex.ru>
Ekaterina Babshukova [Sat, 5 Oct 2019 14:48:31 +0000 (17:48 +0300)]
remove `visitor` module
bors[bot] [Sat, 5 Oct 2019 14:25:59 +0000 (14:25 +0000)]
Merge #1928
1928: Support `#[cfg(..)]` r=matklad a=oxalica
This PR implement `#[cfg(..)]` conditional compilation. It read default cfg options from `rustc --print cfg` with also hard-coded `test` and `debug_assertion` enabled.
Front-end settings are **not** included in this PR.
There is also a known issue that inner control attributes are totally ignored. I think it is **not** a part of `cfg` and create a separated issue for it. #1949
Fixes #1920
Related: #1073
Co-authored-by: uHOOCCOOHu <hooccooh1896@gmail.com>
Co-authored-by: oxalica <oxalicc@pm.me>
Ekaterina Babshukova [Sat, 5 Oct 2019 14:03:03 +0000 (17:03 +0300)]
replace AST visitors with macro
oxalica [Sat, 5 Oct 2019 12:55:27 +0000 (20:55 +0800)]
Use raw cfgs in json project and fix typo
bors[bot] [Sat, 5 Oct 2019 09:09:38 +0000 (09:09 +0000)]
Merge #1952
1952: Create an assist for applying De Morgan's Law r=matklad a=cronokirby
Fixes #1807
This assist can transform expressions of the form `!x || !y` into
`!(x && y)`. This also works with `&&`.
This assist will only trigger if the cursor is on the central logical
operator.
The main limitation of this current implementation is that both operands
need to be an explicit negation, either of the form `!x`, or `x != y`.
More operands could be accepted, but this would complicate the implementation
quite a bit.
Co-authored-by: Lúcás Meier <cronokirby@gmail.com>
bors[bot] [Fri, 4 Oct 2019 21:51:44 +0000 (21:51 +0000)]
Merge #1957
1957: Add alternative setup instruction for vim/neovim r=matklad a=Luke-Nukem
Provide another option hint for vim/neovim users who do not want to run nodejs
Co-authored-by: Luke Jones <luke@ljones.dev>
bors[bot] [Fri, 4 Oct 2019 21:41:59 +0000 (21:41 +0000)]
Merge #1956
1956: don't keep history for gh-pages r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Luke Jones [Fri, 4 Oct 2019 21:36:30 +0000 (10:36 +1300)]
Add alternative setup instruction for vim/neovim
Provide another option hint for vim/neovim users who do not want to run nodejs
Aleksey Kladov [Fri, 4 Oct 2019 21:40:35 +0000 (00:40 +0300)]
don't keep history for gh-pages
docs weigh a lot, and change a lot. Keeping their changes in history
inflates repo size. By specifying `keep-history: false` we should be
able to avoid that.
Lúcás Meier [Fri, 4 Oct 2019 10:45:22 +0000 (12:45 +0200)]
Fix typo about De Morgan's law assist
Lúcás Meier [Fri, 4 Oct 2019 09:03:35 +0000 (11:03 +0200)]
[#1807] Add entry in docs/user/features
Lúcás Meier [Fri, 4 Oct 2019 08:51:41 +0000 (10:51 +0200)]
[#1807] Refactor file structure
Use the more conventional way of importing the ast types, and
put the assist at the top of the file.
Lúcás Meier [Fri, 4 Oct 2019 06:21:24 +0000 (08:21 +0200)]
Fix formatting
Lúcás Meier [Thu, 3 Oct 2019 20:48:35 +0000 (22:48 +0200)]
Create an assist for applying De Morgan's law
Fixes #1807
This assist can transform expressions of the form `!x || !y` into
`!(x && y)`. This also works with `&&`.
This assist will only trigger if the cursor is on the central logical
operator.
The main limitation of this current implementation is that both operands
need to be an explicit negation, either of the form `!x`, or `x != y`.
More operands could be accepted, but this would complicate the implementation
quite a bit.
Lúcás Meier [Thu, 3 Oct 2019 20:19:46 +0000 (22:19 +0200)]
WIP: Add demorgan application with naive negation
bors[bot] [Thu, 3 Oct 2019 15:03:29 +0000 (15:03 +0000)]
Merge #1950
1950: Fix parsing of block expressions in "forbid_structs" contexts. r=kjeremy a=goffrie
Forbidding block expressions entirely is too strict; instead, we should only
forbid them in contexts where we are parsing an optional RHS (i.e. the RHS of a
range expression).
Fixes #1773.
Co-authored-by: Geoffry Song <goffrie@gmail.com>
Geoffry Song [Thu, 3 Oct 2019 06:38:03 +0000 (23:38 -0700)]
Fix parsing of block expressions in "forbid_structs" contexts.
Forbidding block expressions entirely is too strict; instead, we should only
forbid them in contexts where we are parsing an optional RHS (i.e. the RHS of a
range expression).
Geoffry Song [Thu, 3 Oct 2019 07:10:58 +0000 (00:10 -0700)]
Lower the precedence of the `as` operator.
Previously, the `as` operator was being parsed like a postfix expression, and
therefore being given the highest possible precedence. That caused it to bind
more tightly than prefix operators, which it should not. Instead, parse it
somewhat like a normal binary expression with some special-casing.
bors[bot] [Wed, 2 Oct 2019 18:57:20 +0000 (18:57 +0000)]
Merge #1945
1945: Handle divergence in type inference for blocks r=flodiebold a=lnicola
Fixes #1944.
The `infer_basics` test is failing, not sure what to do about it.
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
uHOOCCOOHu [Wed, 2 Oct 2019 18:50:22 +0000 (02:50 +0800)]
Add docs
uHOOCCOOHu [Wed, 2 Oct 2019 18:02:53 +0000 (02:02 +0800)]
Read default cfgs from rustc
uHOOCCOOHu [Wed, 2 Oct 2019 17:38:56 +0000 (01:38 +0800)]
Optimize
uHOOCCOOHu [Wed, 2 Oct 2019 17:20:08 +0000 (01:20 +0800)]
Refactor CfgOptions inside
uHOOCCOOHu [Mon, 30 Sep 2019 09:47:17 +0000 (17:47 +0800)]
Support cfg attribute on impl blocks
uHOOCCOOHu [Sun, 29 Sep 2019 23:38:16 +0000 (07:38 +0800)]
Enable CfgOptions `test` for workspace crates
uHOOCCOOHu [Sun, 29 Sep 2019 22:52:15 +0000 (06:52 +0800)]
Introduce ra_cfg to parse and evaluate CfgExpr
uHOOCCOOHu [Sun, 29 Sep 2019 18:50:56 +0000 (02:50 +0800)]
Pass attributes as token tree to DefCollector
bors[bot] [Wed, 2 Oct 2019 17:26:57 +0000 (17:26 +0000)]
Merge #1948
1948: Update pico-args, flexi_logger and either r=matklad a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Wed, 2 Oct 2019 14:58:15 +0000 (10:58 -0400)]
Update pico-args
kjeremy [Wed, 2 Oct 2019 14:48:14 +0000 (10:48 -0400)]
flexi_logger and either
Laurențiu Nicola [Wed, 2 Oct 2019 12:14:50 +0000 (15:14 +0300)]
Handle divergence in type inference for blocks
bors[bot] [Mon, 30 Sep 2019 19:10:57 +0000 (19:10 +0000)]
Merge #1938
1938: :arrow_up: deps r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 30 Sep 2019 19:05:46 +0000 (22:05 +0300)]
:arrow_up: deps
bors[bot] [Mon, 30 Sep 2019 10:46:13 +0000 (10:46 +0000)]
Merge #1937
1937: Added test for check doc strings in directory crates/ r=andreevlex a=andreevlex
#1856
Co-authored-by: Alexander Andreev <andreevlex.as@gmail.com>
Alexander Andreev [Mon, 30 Sep 2019 10:31:28 +0000 (13:31 +0300)]
Change user message.
Alexander Andreev [Mon, 30 Sep 2019 09:09:56 +0000 (12:09 +0300)]
Drop debug strings.
Alexander Andreev [Mon, 30 Sep 2019 09:07:26 +0000 (12:07 +0300)]
Merge branch 'master' into feature/issue/1856
# Conflicts:
# crates/ra_assists/src/ast_editor.rs
Alexander Andreev [Mon, 30 Sep 2019 08:58:53 +0000 (11:58 +0300)]
Added test for check doc strings in crates.
#1856
bors[bot] [Mon, 30 Sep 2019 08:46:08 +0000 (08:46 +0000)]
Merge #1934
1934: Parse Path and AttrInput in Attr r=matklad a=uHOOCCOOHu
[Syntax reference](https://doc.rust-lang.org/reference/attributes.html#attributes)
Co-authored-by: uHOOCCOOHu <hooccooh1896@gmail.com>
uHOOCCOOHu [Mon, 30 Sep 2019 08:09:02 +0000 (16:09 +0800)]
Fixes
uHOOCCOOHu [Sun, 29 Sep 2019 21:15:03 +0000 (05:15 +0800)]
Fix API of Attr
uHOOCCOOHu [Sun, 29 Sep 2019 20:44:33 +0000 (04:44 +0800)]
Parse correct AttrInput
bors[bot] [Mon, 30 Sep 2019 07:16:23 +0000 (07:16 +0000)]
Merge #1936
1936: cleanup editor r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 30 Sep 2019 07:08:28 +0000 (10:08 +0300)]
cleanup editor
Aleksey Kladov [Mon, 30 Sep 2019 07:05:12 +0000 (10:05 +0300)]
remove ast_editor.rs
Aleksey Kladov [Mon, 30 Sep 2019 06:56:20 +0000 (09:56 +0300)]
move remove bounds to ast/edit.rs
Aleksey Kladov [Mon, 30 Sep 2019 06:27:26 +0000 (09:27 +0300)]
move field list to ast/edit.rs
Aleksey Kladov [Sat, 28 Sep 2019 17:09:57 +0000 (20:09 +0300)]
migrate add impl items to the new editing API
Aleksey Kladov [Sat, 28 Sep 2019 16:50:16 +0000 (19:50 +0300)]
simplify strip attrs
bors[bot] [Sat, 28 Sep 2019 15:59:28 +0000 (15:59 +0000)]
Merge #1931
1931: Support the new deprecated tag r=matklad a=arsdragonfly
Which is rendered as a strike-through line. Fixes #1671 .
![深度截图_选择区域_20190927162008](https://user-images.githubusercontent.com/
4067473 /
65799714 -
ccb4c180 -e142-11e9-8e45-
ab18964605f3 .png)
Co-authored-by: arsdragonfly <arsdragonfly@gmail.com>
bors[bot] [Sat, 28 Sep 2019 15:51:02 +0000 (15:51 +0000)]
Merge #1932
1932: correctly reset chalk state after a panic r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 28 Sep 2019 15:49:00 +0000 (18:49 +0300)]
correctly reset chalk state after a panic
arsdragonfly [Sat, 28 Sep 2019 00:02:51 +0000 (20:02 -0400)]
Fix
arsdragonfly [Fri, 27 Sep 2019 21:33:14 +0000 (17:33 -0400)]
Fix tests
arsdragonfly [Fri, 27 Sep 2019 20:17:23 +0000 (16:17 -0400)]
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer
arsdragonfly [Fri, 27 Sep 2019 20:17:02 +0000 (16:17 -0400)]
Support the new deprecated tag
bors[bot] [Fri, 27 Sep 2019 17:48:00 +0000 (17:48 +0000)]
Merge #1930
1930: replace horrible hack with a slightly less horrible one r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 27 Sep 2019 17:47:36 +0000 (20:47 +0300)]
replace horrible hack with a slightly less horrible one
bors[bot] [Fri, 27 Sep 2019 02:58:26 +0000 (02:58 +0000)]
Merge #1815
1815: Support correct `$crate` expansion in macros r=uHOOCCOOHu a=uHOOCCOOHu
This PR makes normal use cases of `$crate` from macros work as expected.
It makes more macros from `std` work. Type inference works well with `panic`, `unimplemented`, `format`, and maybe more.
Sadly that `vec![1, 2, 3]` still not works, but it is not longer an issue about macro.
Screenshot:
![Screenshot_20190927_022136](https://user-images.githubusercontent.com/
14816024 /
65714465 -
b4568f80 -e0cd-11e9-8043-
dd44c2ae8040 .png)
Co-authored-by: uHOOCCOOHu <hooccooh1896@gmail.com>
uHOOCCOOHu [Fri, 27 Sep 2019 02:55:25 +0000 (10:55 +0800)]
Fix
bors[bot] [Thu, 26 Sep 2019 21:04:20 +0000 (21:04 +0000)]
Merge #1923
1923: Add SubstsBuilder r=flodiebold a=flodiebold
+ further refactoring.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Thu, 26 Sep 2019 19:37:03 +0000 (21:37 +0200)]
Add SubstsBuilder
+ further refactoring.
bors[bot] [Thu, 26 Sep 2019 19:31:28 +0000 (19:31 +0000)]
Merge #1921
1921: WIP: start simplifying editing API r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 26 Sep 2019 19:08:44 +0000 (22:08 +0300)]
Start simplifying editing API
uHOOCCOOHu [Thu, 26 Sep 2019 17:59:38 +0000 (01:59 +0800)]
Support `$crate` in item and expr place.
uHOOCCOOHu [Thu, 26 Sep 2019 16:16:55 +0000 (00:16 +0800)]
Store crate info in `MacroDefId`
uHOOCCOOHu [Thu, 26 Sep 2019 18:04:47 +0000 (02:04 +0800)]
Refactor `Name` ready for hygienic macro
bors[bot] [Thu, 26 Sep 2019 12:58:54 +0000 (12:58 +0000)]
Merge #1919
1919: move diff to ra_syntax r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 26 Sep 2019 12:56:52 +0000 (15:56 +0300)]
move diff to ra_syntax
bors[bot] [Thu, 26 Sep 2019 12:30:44 +0000 (12:30 +0000)]
Merge #1918
1918: keep ast creation API simple r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 26 Sep 2019 09:18:26 +0000 (12:18 +0300)]
keep ast creation API simple
bors[bot] [Thu, 26 Sep 2019 09:33:18 +0000 (09:33 +0000)]
Merge #1917
1917: disable periodic GC r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 26 Sep 2019 09:31:16 +0000 (12:31 +0300)]
disable periodic GC
There's hypothesis that it doesn't do anything useful now that we have
LRU...
bors[bot] [Thu, 26 Sep 2019 08:19:18 +0000 (08:19 +0000)]
Merge #1823
1823: Support type coercion r=flodiebold a=uHOOCCOOHu
Co-authored-by: uHOOCCOOHu <hooccooh1896@gmail.com>
bors[bot] [Thu, 26 Sep 2019 05:11:23 +0000 (05:11 +0000)]
Merge #1916
1916: Missing word r=matklad a=nicrd
Co-authored-by: nicrd <nicolasrd@gmail.com>
nicrd [Thu, 26 Sep 2019 01:49:52 +0000 (21:49 -0400)]
Missing word
uHOOCCOOHu [Wed, 25 Sep 2019 21:56:55 +0000 (05:56 +0800)]
Support all coercion places
uHOOCCOOHu [Wed, 18 Sep 2019 16:36:12 +0000 (00:36 +0800)]
Support custom `CoerceUnsized`
Split out tests about coercion
uHOOCCOOHu [Tue, 17 Sep 2019 19:59:51 +0000 (03:59 +0800)]
Better handle never type and branch merging
Split out tests for never type to another file
uHOOCCOOHu [Thu, 12 Sep 2019 18:59:21 +0000 (02:59 +0800)]
Support basic implicit type coerce
uHOOCCOOHu [Tue, 17 Sep 2019 20:15:31 +0000 (04:15 +0800)]
Support auto-deref in argument position
bors[bot] [Wed, 25 Sep 2019 20:44:20 +0000 (20:44 +0000)]
Merge #1912
1912: add new editing API, suitable for modifying several nodes at once r=viorina a=matklad
r? @viorina
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
bors[bot] [Wed, 25 Sep 2019 20:23:09 +0000 (20:23 +0000)]
Merge #1914
1914: Resolve trait associated items r=matklad a=flodiebold
E.g. `Default::default` or `<Foo as Default>::default`.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Wed, 25 Sep 2019 19:41:17 +0000 (21:41 +0200)]
Resolve trait associated items
E.g. `Default::default` or `<Foo as Default>::default`.
bors[bot] [Wed, 25 Sep 2019 18:14:35 +0000 (18:14 +0000)]
Merge #1913
1913: Fix retrieval of the Fn traits r=flodiebold a=flodiebold
I used the wrong query, so it only used the lang items from the respective
crate...
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Wed, 25 Sep 2019 18:01:02 +0000 (20:01 +0200)]
Fix retrieval of the Fn traits
I used the wrong query, so it only used the lang items from the respective
crate...
Aleksey Kladov [Wed, 25 Sep 2019 14:57:12 +0000 (17:57 +0300)]
add new editing API, suitable for modifying several nodes at once
bors[bot] [Wed, 25 Sep 2019 14:19:46 +0000 (14:19 +0000)]
Merge #1911
1911: fewer monomorphisations r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 25 Sep 2019 14:19:16 +0000 (17:19 +0300)]
fewer monomorphisations
bors[bot] [Wed, 25 Sep 2019 12:59:12 +0000 (12:59 +0000)]
Merge #1910
1910: Assists r=matklad a=matklad
bors r+
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 25 Sep 2019 12:58:40 +0000 (15:58 +0300)]
clean up naming
Aleksey Kladov [Wed, 25 Sep 2019 12:39:41 +0000 (15:39 +0300)]
cleanup diagnostics
Aleksey Kladov [Wed, 25 Sep 2019 12:28:26 +0000 (15:28 +0300)]
shorten AstBuilder names