]>
git.lizzy.rs Git - rust.git/log
bors[bot] [Mon, 21 Jun 2021 17:05:21 +0000 (17:05 +0000)]
Merge #9080
9080: Improve completion of cfg attributes r=JamieCunliffe a=JamieCunliffe
This will close #5398 and it also adds some completion for cfg options.
Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@outlook.com>
Jamie Cunliffe [Mon, 31 May 2021 19:45:01 +0000 (20:45 +0100)]
Move features into potential_cfg_options
Jamie Cunliffe [Sun, 30 May 2021 13:52:19 +0000 (14:52 +0100)]
Improve completion of cfg attributes
The completion of cfg will look at the enabled cfg keys when
performing completion.
It will also look crate features when completing a feature cfg
option. A fixed list of known values for some cfg options are
provided.
For unknown keys it will look at the enabled values for that cfg key,
which means that completion will only show enabled options for those.
bors[bot] [Mon, 21 Jun 2021 15:49:02 +0000 (15:49 +0000)]
Merge #9359
9359: internal: Update vscode-languageclient r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Mon, 21 Jun 2021 15:30:08 +0000 (11:30 -0400)]
Update vscode-languageclient
bors[bot] [Mon, 21 Jun 2021 15:11:21 +0000 (15:11 +0000)]
Merge #9165
9165: Apply some clippy suggestions r=matklad a=clemenswasser
Co-authored-by: Clemens Wasser <clemens.wasser@gmail.com>
Clemens Wasser [Mon, 7 Jun 2021 11:59:01 +0000 (13:59 +0200)]
Apply some clippy suggestions
bors[bot] [Mon, 21 Jun 2021 14:15:49 +0000 (14:15 +0000)]
Merge #9264
9264: feat: Make documentation on hover configurable r=Veykril a=Veykril
This also implements deprecation support for config options as this renames `hoverActions_linksInHover` to `hover_linksInHover`.
Fixes #9232
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Mon, 21 Jun 2021 14:01:03 +0000 (16:01 +0200)]
Remove deprecation support in config
bors[bot] [Mon, 21 Jun 2021 13:59:29 +0000 (13:59 +0000)]
Merge #9314
9314: Fix extract_function with await r=sasurau4 a=sasurau4
Fix #9287
Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
Daiki Ihara [Mon, 21 Jun 2021 13:47:39 +0000 (22:47 +0900)]
Fix var name
bors[bot] [Mon, 21 Jun 2021 13:41:27 +0000 (13:41 +0000)]
Merge #9227
9227: Add a config setting to disable the 'test' cfg in specified crates r=matklad a=lf-
If you are opening libcore from rust-lang/rust as opposed to e.g.
goto definition from some other crate which would use the sysroot
instance of libcore, a `#![cfg(not(test))]` would previously have made
all the code excluded from the module tree, breaking the editor
experience.
Core does not need to ever be edited with `#[cfg(test)]` enabled,
as the tests are in another crate.
This PR puts in a slight hack that checks for the crate name "core" and
turns off `#[cfg(test)]` for that crate.
Fixes #9203
Fixes #9226
Co-authored-by: Jade <software@lfcode.ca>
bors[bot] [Mon, 21 Jun 2021 13:27:57 +0000 (13:27 +0000)]
Merge #9357
9357: fix: Update sysroot crates r=jonas-schievink a=jonas-schievink
Removes `rtstartup`, since that's not a Cargo crate (its files are compiled into object files and linked alongside the stdlib).
Adds `std_detect`.
Part of https://github.com/rust-analyzer/rust-analyzer/issues/9352 (doesn't fix it since std_detect is full of `cfg_if!`)
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Mon, 21 Jun 2021 13:26:26 +0000 (15:26 +0200)]
Update sysroot crates
bors[bot] [Mon, 21 Jun 2021 13:15:12 +0000 (13:15 +0000)]
Merge #9356
9356: internal: Move out and regroup more completion tests r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Mon, 21 Jun 2021 13:14:28 +0000 (15:14 +0200)]
Various keyword completion fixes
Lukas Wirth [Mon, 21 Jun 2021 12:59:49 +0000 (14:59 +0200)]
Move out completion type position tests
bors[bot] [Mon, 21 Jun 2021 13:00:02 +0000 (13:00 +0000)]
Merge #9355
9355: Don't insert `}` when typing `{` in string r=jonas-schievink a=jonas-schievink
Checks that the token at the cursor is `L_CURLY`.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/9351
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Mon, 21 Jun 2021 12:54:49 +0000 (14:54 +0200)]
Don't insert `}` when typing `{` in string
bors[bot] [Mon, 21 Jun 2021 12:52:08 +0000 (12:52 +0000)]
Merge #9347
9347: add note about passing cfg(debug_assertions) r=matklad a=rezural
add note about passing cfg(debug_assertions) to rustc on build. The server will not spin on start without this arcane hack
Co-authored-by: rezural <69941255+rezural@users.noreply.github.com>
Lukas Wirth [Mon, 21 Jun 2021 11:48:25 +0000 (13:48 +0200)]
Move out completion pattern tests
Daiki Ihara [Mon, 21 Jun 2021 09:42:25 +0000 (18:42 +0900)]
Fix pointed out
Daiki Ihara [Thu, 17 Jun 2021 14:54:49 +0000 (23:54 +0900)]
Fix extract_function with await
rezural [Sun, 20 Jun 2021 23:33:57 +0000 (09:33 +1000)]
output to log file if RA_LOG_FILE is defined in environment
bors[bot] [Sun, 20 Jun 2021 17:38:27 +0000 (17:38 +0000)]
Merge #9346
9346: Refactor / clean up hir_ty tests r=flodiebold a=flodiebold
Notable changes:
- unify `check_types` and `check_mismatches` into `check`, which supports both kinds of annotations (`check_types` still exists because I didn't want to change all the annotations, but uses the same implementation)
- because of that, `check_types` now fails on any type mismatches; also annotations always have to hit the exact range
- there's also `check_no_mismatches` for when we explicitly just want to check that there are no type mismatches without giving any annotations (`check` will fail without annotations)
- test annotations can now be overlapping (they point to the nearest line that has actual code in that range):
```
// ^^^^ annotation
// ^^^^^^^^^ another annotation
```
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Sun, 20 Jun 2021 17:37:45 +0000 (19:37 +0200)]
Fix `benchmark_include_macro`
Florian Diebold [Sun, 20 Jun 2021 17:10:45 +0000 (19:10 +0200)]
More cleanups, use `check` for `display_source_code` tests
Florian Diebold [Sun, 20 Jun 2021 16:36:59 +0000 (18:36 +0200)]
Clean up coercion tests
Florian Diebold [Sun, 20 Jun 2021 16:34:43 +0000 (18:34 +0200)]
test_utils: Make overlapping annotations possible
Florian Diebold [Sun, 20 Jun 2021 14:37:50 +0000 (16:37 +0200)]
Unify check_mismatches and check_types
Florian Diebold [Sat, 19 Jun 2021 16:17:57 +0000 (18:17 +0200)]
Add coverage mark for block local impls
bors[bot] [Sun, 20 Jun 2021 16:38:46 +0000 (16:38 +0000)]
Merge #9345
9345: fix: don't add duplicate `&` during completion r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 20 Jun 2021 16:32:45 +0000 (19:32 +0300)]
fix: don't add duplicate `&` during completion
bors[bot] [Sun, 20 Jun 2021 14:08:19 +0000 (14:08 +0000)]
Merge #9344
9344: fix: rename works when invoked on a reference r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 20 Jun 2021 14:07:14 +0000 (17:07 +0300)]
fix: rename works when invoked on a reference
bors[bot] [Sun, 20 Jun 2021 03:22:13 +0000 (03:22 +0000)]
Merge #9328
9328: internal: Update deps r=lnicola a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
rezural [Sun, 20 Jun 2021 01:23:20 +0000 (11:23 +1000)]
add note about passing cfg(debug_assertions)
add note about passing cfg(debug_assertions) to rustc on build. The server will not spin without this arcane hack
bors[bot] [Sat, 19 Jun 2021 20:33:54 +0000 (20:33 +0000)]
Merge #9339
9339: minor: Cleanup insert_use tests r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sat, 19 Jun 2021 20:31:24 +0000 (22:31 +0200)]
Cleanup insert_use tests
bors[bot] [Sat, 19 Jun 2021 09:18:34 +0000 (09:18 +0000)]
Merge #9338
9338: minor: use minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Milo [Sat, 19 Jun 2021 09:14:15 +0000 (10:14 +0100)]
remove num_format
Aleksey Kladov [Sat, 19 Jun 2021 09:03:59 +0000 (12:03 +0300)]
minor: use minicore
Milo [Sat, 19 Jun 2021 08:44:11 +0000 (09:44 +0100)]
update crate and deps section
Jade [Mon, 14 Jun 2021 04:41:46 +0000 (21:41 -0700)]
Implement a config override for the default #[cfg(test)] in cargo crates
Fixes crates which vanish when the 'test' cfg atom is set.
Fix #7243.
Fix #9203.
Fix #7225.
Jade [Sat, 12 Jun 2021 12:16:22 +0000 (05:16 -0700)]
Fix libcore not being included in rust-lang/rust module tree
If you are opening libcore from rust-lang/rust as opposed to e.g.
goto definition from some other crate which would use the sysroot
instance of libcore, a `#![cfg(not(test))]` would previously have made
all the code excluded from the module tree, breaking the editor
experience.
This puts in a slight hack that checks for the crate name "core" and
turns off `#[cfg(test)]`.
Milo [Sat, 19 Jun 2021 07:12:58 +0000 (08:12 +0100)]
fmt
Milo [Sat, 19 Jun 2021 07:12:46 +0000 (08:12 +0100)]
use num_format
Milo [Sat, 19 Jun 2021 06:51:44 +0000 (07:51 +0100)]
clean up some wording
Milo [Fri, 18 Jun 2021 22:34:00 +0000 (23:34 +0100)]
remove incorrect double blank new lines
Milo [Fri, 18 Jun 2021 22:20:30 +0000 (23:20 +0100)]
make workspaces look better
bors[bot] [Fri, 18 Jun 2021 21:58:35 +0000 (21:58 +0000)]
Merge #9335
9335: feat: Don't insert imports outside of cfg attributed items r=Veykril a=Veykril
Closes #6939
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 18 Jun 2021 21:53:41 +0000 (23:53 +0200)]
Don't insert imports outside of cfg attributed items
bors[bot] [Fri, 18 Jun 2021 21:23:22 +0000 (21:23 +0000)]
Merge #9334
9334: feat: Allow to disable import insertion on single path glob imports r=Veykril a=Veykril
On by default as I feel like this is something the majority would prefer.
Closes #8490
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 18 Jun 2021 21:11:56 +0000 (23:11 +0200)]
Allow to disable import insertion on single path glob imports
bors[bot] [Fri, 18 Jun 2021 21:00:24 +0000 (21:00 +0000)]
Merge #9333
9333: minor: use minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 18 Jun 2021 20:56:15 +0000 (23:56 +0300)]
minor: use minicore
bors[bot] [Fri, 18 Jun 2021 20:49:31 +0000 (20:49 +0000)]
Merge #9332
9332: minor: use minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 18 Jun 2021 20:48:18 +0000 (23:48 +0300)]
minor: use minicore
Aleksey Kladov [Fri, 18 Jun 2021 20:38:19 +0000 (23:38 +0300)]
minor: use minicore
Aleksey Kladov [Fri, 18 Jun 2021 20:33:01 +0000 (23:33 +0300)]
minor: use minicore
Aleksey Kladov [Fri, 18 Jun 2021 20:28:37 +0000 (23:28 +0300)]
minor: use minicore
bors[bot] [Fri, 18 Jun 2021 19:47:46 +0000 (19:47 +0000)]
Merge #9331
9331: internal: add index to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 18 Jun 2021 19:47:02 +0000 (22:47 +0300)]
internal: use minicore deref more
Aleksey Kladov [Fri, 18 Jun 2021 19:37:03 +0000 (22:37 +0300)]
internal: add index to minicore
bors[bot] [Fri, 18 Jun 2021 19:26:08 +0000 (19:26 +0000)]
Merge #9330
9330: minor: use minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 18 Jun 2021 19:24:48 +0000 (22:24 +0300)]
minor: use minicore
Aleksey Kladov [Fri, 18 Jun 2021 19:14:39 +0000 (22:14 +0300)]
minor: use minicore
bors[bot] [Fri, 18 Jun 2021 19:11:13 +0000 (19:11 +0000)]
Merge #9329
9329: internal: add Copy to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 18 Jun 2021 19:10:29 +0000 (22:10 +0300)]
internal: add Copy to minicore
kjeremy [Fri, 18 Jun 2021 18:36:12 +0000 (14:36 -0400)]
Update test
kjeremy [Fri, 18 Jun 2021 18:31:09 +0000 (14:31 -0400)]
cargo update
Milo [Fri, 18 Jun 2021 18:22:03 +0000 (19:22 +0100)]
Recreate PR.
bors[bot] [Fri, 18 Jun 2021 18:10:52 +0000 (18:10 +0000)]
Merge #9327
9327: Update css-what r=kjeremy a=kjeremy
npm audit flagged our version of css-what
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Fri, 18 Jun 2021 17:57:48 +0000 (13:57 -0400)]
Update css-what
npm audit flagged out version of css-what
bors[bot] [Fri, 18 Jun 2021 16:47:58 +0000 (16:47 +0000)]
Merge #9321
9321: Inline generics in const and function trait completions r=Veykril a=RDambrosio016
This PR does a couple of things:
- moves path_transform from ide_assists to ide_db to be shared by both assists and completions
- when completing a const or a function for a trait, it will "inline" any generics in those associated items instead
of leaving the generic's name. For example:
```rust
trait Foo<T> {
const BAR: T;
fn foo() -> T;
}
struct Bar;
impl Foo<u32> for Bar {
// autocompletes to this
fn foo() -> u32;
// and not this (old)
fn foo() -> T;
// also works for associated consts and where clauses
const BAR: u32 = /* */
}
```
Currently this does not work for const generics, because `PathTransform` does not seem to account for them. If this should work on const generics too, `PathTransform` will need to be changed. However, it is uncommon to implement a trait only for a single const value, so this isnt a huge concern.
Co-authored-by: rdambrosio <rdambrosio016@gmail.com>
rdambrosio [Fri, 18 Jun 2021 16:42:13 +0000 (12:42 -0400)]
Lift ast -> hir out of the for_each
bors[bot] [Fri, 18 Jun 2021 12:18:25 +0000 (12:18 +0000)]
Merge #9325
9325: Minor: clippy perf fixes r=matklad a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
bors[bot] [Fri, 18 Jun 2021 11:48:01 +0000 (11:48 +0000)]
Merge #9326
9326: Minor: Fix line numbering in tidy r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Fri, 18 Jun 2021 11:47:26 +0000 (14:47 +0300)]
Fix line numbering in tidy
Laurențiu Nicola [Fri, 18 Jun 2021 11:44:36 +0000 (14:44 +0300)]
Avoid string allocation
Laurențiu Nicola [Fri, 18 Jun 2021 11:40:51 +0000 (14:40 +0300)]
Minor clippy perf fixes
rdambrosio [Fri, 18 Jun 2021 06:14:00 +0000 (02:14 -0400)]
Remove extra whitespace
rdambrosio [Thu, 17 Jun 2021 23:54:28 +0000 (19:54 -0400)]
Feat: inline generics in const and func trait completions
bors[bot] [Thu, 17 Jun 2021 22:30:30 +0000 (22:30 +0000)]
Merge #9313
9313: fix: Don't complete keywords in attributes inside expressions r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
bors[bot] [Thu, 17 Jun 2021 21:44:44 +0000 (21:44 +0000)]
Merge #9320
9320: internal: retire famous_defs_fixture r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 17 Jun 2021 21:42:32 +0000 (00:42 +0300)]
internal: retire famous_defs_fixture
This is now done declaratively via `minicore`.
Aleksey Kladov [Thu, 17 Jun 2021 21:36:25 +0000 (00:36 +0300)]
minor: simplify
bors[bot] [Thu, 17 Jun 2021 21:31:05 +0000 (21:31 +0000)]
Merge #9319
9319: internal: add derive and ord support to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 17 Jun 2021 21:30:22 +0000 (00:30 +0300)]
internal: add derive and ord support to minicore
bors[bot] [Thu, 17 Jun 2021 19:22:48 +0000 (19:22 +0000)]
Merge #9318
9318: feat: Complete `repr` attribute parameters r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Thu, 17 Jun 2021 19:15:35 +0000 (21:15 +0200)]
Complete `repr` attribute parameters
bors[bot] [Thu, 17 Jun 2021 18:04:38 +0000 (18:04 +0000)]
Merge #9317
9317: internal: add From to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 17 Jun 2021 17:58:05 +0000 (20:58 +0300)]
internal: add From to minicore
Aleksey Kladov [Thu, 17 Jun 2021 17:51:34 +0000 (20:51 +0300)]
minor: dead code
bors[bot] [Thu, 17 Jun 2021 17:50:15 +0000 (17:50 +0000)]
Merge #9316
9316: internal: add default to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 17 Jun 2021 17:49:49 +0000 (20:49 +0300)]
internal: add default to minicore
bors[bot] [Thu, 17 Jun 2021 16:22:32 +0000 (16:22 +0000)]
Merge #9315
9315: Nest all the or-patterns! r=Veykril a=Veykril
`cargo +nightly clippy --fix -Z unstable-options --allow-dirty -- -A clippy::all -D clippy::unnested_or_patterns`
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Thu, 17 Jun 2021 16:09:44 +0000 (18:09 +0200)]
Fix parser tests for 1.53
Lukas Wirth [Thu, 17 Jun 2021 15:46:06 +0000 (17:46 +0200)]
simplify
Lukas Wirth [Thu, 17 Jun 2021 15:37:14 +0000 (17:37 +0200)]
Nest all the or-patterns!