bors[bot]
11de7ac2fb
Merge #4743
...
4743: Add tracking of packed repr, use it to highlight unsafe refs r=matklad a=Nashenas88
Taking a reference to a misaligned field on a packed struct is an
unsafe operation. Highlight that behavior. Currently, the misaligned
part isn't tracked, so this highlight is a bit too aggressive.
Fixes #4600
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Co-authored-by: Paul Daniel Faria <nashenas88@users.noreply.github.com>
Co-authored-by: Paul Daniel Faria <paulf@pop-os.localdomain>
2020-08-12 13:20:18 +00:00
bors[bot]
2d41cc0ea3
Merge #5722
...
5722: Replace SepBy with Itertools
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-08-12 13:06:38 +00:00
Aleksey Kladov
1c359ab634
Replace SepBy with Itertools
2020-08-12 15:04:06 +02:00
bors[bot]
441fbe3b0a
Merge #5721
...
5721: Cleanup parser modifiers tests
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-08-12 12:53:11 +00:00
Aleksey Kladov
f8bfd77e84
Cleanup parser modifiers tests
2020-08-12 14:52:37 +02:00
Aleksey Kladov
f73a6419d4
Allow default everywhere
...
closes #5681
2020-08-12 14:28:32 +02:00
bors[bot]
42a1692629
Merge #5720
...
5720: Fix docs
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-08-12 11:59:02 +00:00
Aleksey Kladov
c9a42c7c46
Fix docs
2020-08-12 13:56:58 +02:00
bors[bot]
4b3d99f98f
Merge #5699
...
5699: Fix clippy warnings r=matklad a=popzxc
Currently clippy spawns a bunch of warnings on the `rust-analyzer` project. Nothing critical, but easy to fix, so I guess it won't harm.
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
2020-08-12 11:51:53 +00:00
Igor Aleksanov
fcd4b0176f
Revert style preference-related fixes
2020-08-12 14:08:55 +03:00
bors[bot]
e471cb2a12
Merge #5718
...
5718: Deny clippy
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-08-12 10:51:02 +00:00
Aleksey Kladov
49af51129b
Deny clippy
2020-08-12 12:49:48 +02:00
bors[bot]
d0fd8eb7f6
Merge #5717
...
5717: Minor
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-08-12 10:35:18 +00:00
Jonas Schievink
b27d5233bb
Merge pull request #5716 from jonas-schievink/musl
...
Fix build on musl and test it in CI
2020-08-12 12:31:17 +02:00
Jonas Schievink
67b2b3d0ce
Fix build on musl and test it in CI
2020-08-12 12:23:25 +02:00
Aleksey Kladov
96001921fc
Minor
2020-08-12 12:21:03 +02:00
bors[bot]
87429768bd
Merge #5711
...
5711: Display snippet in the completion label r=matklad a=SomeoneToIgnore
Before, the completion did not show the actual snippet and it was hard to understand what to input to get the right snippet:
<img width="467" alt="image" src="https://user-images.githubusercontent.com/2690773/89941040-21f6a600-dc23-11ea-94b8-61f77f88feaf.png ">
<img width="367" alt="image" src="https://user-images.githubusercontent.com/2690773/89941046-23c06980-dc23-11ea-8034-6c4e14357c94.png ">
Now it's more clear:
<img width="315" alt="image" src="https://user-images.githubusercontent.com/2690773/89941124-42befb80-dc23-11ea-9fcc-5fd49cc92b74.png ">
<img width="210" alt="image" src="https://user-images.githubusercontent.com/2690773/89941132-4488bf00-dc23-11ea-99c2-12ec66e0a044.png ">
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-08-12 10:00:08 +00:00
Aleksey Kladov
8aba6bfef5
Simplify
2020-08-12 10:14:08 +02:00
Kirill Bulatov
7543b06d30
Display snippet in the completion label
2020-08-11 22:33:17 +03:00
bors[bot]
e0de247520
Merge #5708
...
5708: Use Hygiene in completion r=jonas-schievink a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-08-11 10:30:39 +00:00
bors[bot]
ef20dfc78d
Merge #5707
...
5707: Address some FIXMEs for ra_assists r=jonas-schievink a=JmPotato
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Co-authored-by: JmPotato <ghzpotato@gmail.com>
2020-08-11 10:22:57 +00:00
JmPotato
6ef019bd46
Revert some FIXMEs
...
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2020-08-11 17:19:02 +08:00
JmPotato
7fbc9afca4
Typo fix
...
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2020-08-11 16:50:45 +08:00
Laurențiu Nicola
fc01c7846d
Use Hygiene in completion
2020-08-11 10:09:50 +03:00
JmPotato
b69dfddb57
Remove redundant dependencies
...
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2020-08-11 14:35:15 +08:00
JmPotato
ace75f9590
Typo fix
...
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2020-08-11 12:09:11 +08:00
JmPotato
dc6e1e0dac
Address some FIXMEs
...
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2020-08-11 10:55:26 +08:00
Veetaha
4f386afb16
Log the command flycheck runs to debug misconfigurations
...
Without this users have no clue why flycheck fails to run.
This is what is printed to the output channel:
```
[ERROR rust_analyzer::main_loop] cargo check failed: Cargo watcher failed,the command produced no valid metadata (exit code: ExitStatus(ExitStatus(25856)))
```
I stumbled with this figuring out that rust-analyzer adds `--all-features` which is not intended
for some crates in the workspace (e.g. they have mutually-exclusive features.
Having the command rust-analyzer ran should help a lot
2020-08-11 03:12:09 +03:00
Jeremy Kolb
cf6d14cee7
Return InvalidRequest if Shutdown has been requested
...
From the LSP 3.16 spec: "If a server receives requests after a shutdown request those requests should error with InvalidRequest."
2020-08-10 11:03:08 -04:00
Igor Aleksanov
d180b8bbe8
Revert boxing for large enum variant
2020-08-10 15:50:27 +03:00
Paul Daniel Faria
72baf1acdd
Remove unused import left behind after rebasing
2020-08-10 08:46:34 -04:00
Paul Daniel Faria
2199d0cda9
Fix type names broken by rebase, redo expected test because of rebase
2020-08-10 08:46:34 -04:00
Paul Daniel Faria
61dff939f9
Move unsafe semantics methods into SemanticsImpl
and reference them in Semantics
2020-08-10 08:46:34 -04:00
Paul Daniel Faria
39fdd41df4
Return bool from is_unsafe_method_call and cleanup usages
2020-08-10 08:46:34 -04:00
Paul Daniel Faria
a6af0272f7
Move semantic logic into Semantics, fix missing tag for safe amp operator, using functional methods rather than clunky inline closure
2020-08-10 08:46:34 -04:00
Paul Daniel Faria
87cb09365c
Remove merge backup
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
55633f3404
Fix rebase errors
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
08182aa9fa
Move unsafe packed ref logic to Semantics, use Attrs::by_key
to simplify repr attr lookup
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
c5cc24cb31
Revert function structs back to using bool to track self param, use first param for self information in syntax highlighting instead
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
aca3d6c57e
Deduplicate unsafe method call into a single function
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
d5f11e530d
Unsafe borrow of packed fields: account for borrow through ref binding, auto ref function calls
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
38440d53d8
Cleanup repr check, fix packed repr check and test
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
c9e670b875
Update FIXME comment to be more useful
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
4a4b1f48ef
Limit scope of unsafe to & instead of all ref exprs, add test showing missing support for autoref behavior
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
fd30134cf8
Remove token tree from ReprKind::Other variant, expose ReprKind higher, remove debug println.
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
263f9a7f23
Add tracking of packed repr, use it to highlight unsafe refs
...
Taking a reference to a misaligned field on a packed struct is an
unsafe operation. Highlight that behavior. Currently, the misaligned
part isn't tracked, so this highlight is a bit too aggressive.
2020-08-10 08:44:54 -04:00
Igor Aleksanov
6344a7f362
Fix clippy warnings
2020-08-10 15:05:01 +03:00
JmPotato
958b91c1e8
Better codes
...
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2020-08-10 17:51:45 +08:00
JmPotato
4d9c8821e5
Show const body in short_label
...
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2020-08-10 14:02:40 +08:00
bors[bot]
7a03f05eac
Merge #5692
...
5692: Add support for extern crate r=jonas-schievink a=Nashenas88
This adds syntax highlighting, hover and goto def functionality for extern crate.
Fixes #5690
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
2020-08-09 23:16:58 +00:00