]>
git.lizzy.rs Git - rust.git/log
Jonas Schievink [Tue, 30 Jun 2020 11:25:15 +0000 (13:25 +0200)]
Reorder imports
Jonas Schievink [Tue, 30 Jun 2020 11:23:42 +0000 (13:23 +0200)]
Split namespace maps in `ItemScope`
Reduces memory usage of the CrateDefMap query by ~130 MB on r-a.
bors[bot] [Tue, 30 Jun 2020 10:13:45 +0000 (10:13 +0000)]
Merge #5135
5135: Generalize annotations r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 30 Jun 2020 10:13:08 +0000 (12:13 +0200)]
Generalize annotations
bors[bot] [Tue, 30 Jun 2020 08:45:16 +0000 (08:45 +0000)]
Merge #5132
5132: Fix some typos r=matklad a=davidlattimore
Co-authored-by: David Lattimore <dml@google.com>
bors[bot] [Tue, 30 Jun 2020 08:34:08 +0000 (08:34 +0000)]
Merge #5101
5101: Add expect -- a light-weight alternative to insta r=matklad a=matklad
This PR implements a small snapshot-testing library. Snapshot updating is done by setting an env var, or by using editor feature (which runs a test with env-var set).
Here's workflow for updating a failing test:
![expect](https://user-images.githubusercontent.com/
1711539 /
85926956 -
28afa080 -b8a3-11ea-9260-
c6d0d8914d0b .gif)
Here's workflow for adding a new test:
![expect-fresh](https://user-images.githubusercontent.com/
1711539 /
85926961 -
306f4500 -b8a3-11ea-9369-
f2373e327a3f .gif)
Note that colorized diffs are not implemented in this PR, but should be easy to add (we already use them in test_utils).
Main differences from insta (which is essential for rust-analyzer development, thanks @mitsuhiko!):
* self-updating tests, no need for a separate tool
* fewer features (only inline snapshots, no redactions)
* fewer deps (no yaml, no persistence)
* tighter integration with editor
* first-class snapshot object, which can be used to write test functions (as opposed to testing macros)
* trivial to tweak for rust-analyzer needs, by virtue of being a workspace member.
I think eventually we should converge to a single snapshot testing library, but I am not sure that `expect` is exactly right, so I suggest rolling with both insta and expect for some time (if folks agree that expect might be better in the first place!).
# Editor Integration Implementation
The thing I am most excited about is the ability to update a specific snapshot from the editor. I want this to be available to other snapshot-testing libraries (cc @mitsuhiko, @aaronabramov), so I want to document how this works.
The ideal UI here would be a code action (:bulb:). Unfortunately, it seems like it is impossible to implement without some kind of persistence (if you save test failures into some kind of a database, like insta does, than you can read the database from the editor plugin). Note that it is possible to highlight error by outputing error message in rustc's format. Unfortunately, one can't use the same trick to implement a quick fix.
For this reason, expect makes use of another rust-analyzer feature -- ability to run a single test at the cursor position. This does need some expect-specific code in rust-analyzer unfortunately. Specifically, if rust-analyzer notices that the cursor is on `expect!` macro, it adds a special flag to runnable's JSON. However, given #5017 it is possible to approximate this well-enough without rust-analyzer integration. Specifically, an extension can register a special runner which checks (using regexes) if rust-anlyzer runnable covers text with specific macro invocation and do special magic in that case.
closes #3835
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
David Lattimore [Tue, 30 Jun 2020 00:43:37 +0000 (10:43 +1000)]
Fix some typos
bors[bot] [Mon, 29 Jun 2020 23:33:34 +0000 (23:33 +0000)]
Merge #5120
5120: Add a simple SSR subcommand to the rust-analyzer command line binary r=davidlattimore a=davidlattimore
Is adding the dependency on ra_ide_db OK? It's needed for the call to `db.local_roots()`
Co-authored-by: David Lattimore <dml@google.com>
David Lattimore [Mon, 29 Jun 2020 23:31:45 +0000 (09:31 +1000)]
Moved new deps to CLI-only section
bors[bot] [Mon, 29 Jun 2020 18:18:29 +0000 (18:18 +0000)]
Merge #5128
5128: Update serde_json and cc r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Mon, 29 Jun 2020 18:09:29 +0000 (14:09 -0400)]
Update serde_json and cc
bors[bot] [Mon, 29 Jun 2020 16:10:43 +0000 (16:10 +0000)]
Merge #5119
5119: Show notification while SSR is in progress r=matklad a=davidlattimore
Ideally we would (a) show progress and (b) allow cancellation, but at least now there's some indication to the user that something is happening.
Co-authored-by: David Lattimore <dml@google.com>
bors[bot] [Mon, 29 Jun 2020 16:03:10 +0000 (16:03 +0000)]
Merge #5096 #5097
5096: Fix handling of whitespace when applying SSR within macro expansions. r=matklad a=davidlattimore
I originally did replacement by passing in the full file text. Then as some point I thought I could do without it. Turns out calling .text() on a node coming from a macro expansion isn't a great idea, especially when you then try and use ranges from the original source to cut that text. The test I added here actually panics without the rest of this change (sorry I didn't notice sooner).
5097: Fix SSR prompt following #4919 r=matklad a=davidlattimore
Co-authored-by: David Lattimore <dml@google.com>
bors[bot] [Mon, 29 Jun 2020 15:55:42 +0000 (15:55 +0000)]
Merge #5122
5122: Fix "Run | Debug" lens for examples r=matklad a=vsrs
Fixes #4974
Co-authored-by: vsrs <vit@conrlab.com>
bors[bot] [Mon, 29 Jun 2020 15:39:51 +0000 (15:39 +0000)]
Merge #5126
5126: Use more of FxHash* r=matklad a=lnicola
```
-rwxr-xr-x 1 me me
37917528 Jun 29 17:26 /home/me/.cargo/bin/rust-analyzer
-rwxr-xr-x 1 me me
37904056 Jun 29 18:14 /home/me/.cargo/bin/rust-analyzer
```
Saved 13.5 KB there :-).
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
bors[bot] [Mon, 29 Jun 2020 15:25:12 +0000 (15:25 +0000)]
Merge #5127
5127: Update the rest of the tests r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 29 Jun 2020 15:22:47 +0000 (17:22 +0200)]
Update the rest of the tests
Aleksey Kladov [Mon, 29 Jun 2020 12:21:57 +0000 (14:21 +0200)]
(T): make typification tests more data driven
Laurențiu Nicola [Mon, 29 Jun 2020 15:07:52 +0000 (18:07 +0300)]
Use more of FxHash*
bors[bot] [Mon, 29 Jun 2020 14:13:41 +0000 (14:13 +0000)]
Merge #5124
5124: (Partially) fix handling of type params depending on type params r=matklad a=flodiebold
If the first type parameter gets inferred, that's still not handled correctly; it'll require some more refactoring: E.g. if we have `Thing<T, F=fn() -> T>` and then instantiate `Thing<_>`, that gets turned into `Thing<_, fn() -> _>` before the `_` is instantiated into a type variable -- so afterwards, we have two type variables without any connection to each other.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Fri, 26 Jun 2020 14:36:59 +0000 (16:36 +0200)]
(Partially) fix handling of type params depending on type params
If the first type parameter gets inferred, that's still not handled correctly;
it'll require some more refactoring: E.g. if we have `Thing<T, F=fn() -> T>` and
then instantiate `Thing<_>`, that gets turned into `Thing<_, fn() -> _>` before
the `_` is instantiated into a type variable -- so afterwards, we have two type
variables without any connection to each other.
vsrs [Mon, 29 Jun 2020 11:05:52 +0000 (14:05 +0300)]
Fix "Run | Debug" lens for examples
David Lattimore [Mon, 29 Jun 2020 09:17:35 +0000 (19:17 +1000)]
Show notification while SSR is in progress
Ideally we would (a) show progress and (b) allow cancellation, but at least now there's some indication to the user that something is happening.
David Lattimore [Sat, 27 Jun 2020 07:31:50 +0000 (17:31 +1000)]
Add a simple SSR subcommand to the rust-analyzer command line binary
bors[bot] [Sun, 28 Jun 2020 22:37:25 +0000 (22:37 +0000)]
Merge #5105
5105: Simlify with matches!() r=matklad a=Veetaha
Co-authored-by: Veetaha <veetaha2@gmail.com>
Veetaha [Sun, 28 Jun 2020 22:23:39 +0000 (01:23 +0300)]
Get rid of unused imports
Veetaha [Sun, 28 Jun 2020 22:18:50 +0000 (01:18 +0300)]
Follow matklad suggestions
- Move vis_offset() to utils.rs
- Shorten explicit ra_syntax::ast -> ast
- Undo refactoring exhaustive pattern to non-exhaustive
bors[bot] [Sun, 28 Jun 2020 21:43:18 +0000 (21:43 +0000)]
Merge #5114
5114: Cleanup cargo process handling in flycheck r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 28 Jun 2020 21:42:44 +0000 (23:42 +0200)]
Cleanup cargo process handling in flycheck
Aleksey Kladov [Sun, 28 Jun 2020 21:01:28 +0000 (23:01 +0200)]
More standard pattern for Cargo
Aleksey Kladov [Sun, 28 Jun 2020 20:35:18 +0000 (22:35 +0200)]
Naming
Aleksey Kladov [Sun, 28 Jun 2020 20:31:40 +0000 (22:31 +0200)]
Rename
bors[bot] [Sun, 28 Jun 2020 20:08:33 +0000 (20:08 +0000)]
Merge #5113
5113: Update instant r=kjeremy a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Sun, 28 Jun 2020 20:07:44 +0000 (16:07 -0400)]
Update instant
bors[bot] [Sun, 28 Jun 2020 19:32:37 +0000 (19:32 +0000)]
Merge #5112
5112: Update Chalk to released version r=flodiebold a=flodiebold
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Sun, 28 Jun 2020 19:24:20 +0000 (21:24 +0200)]
Update Chalk to released version
Aleksey Kladov [Sun, 28 Jun 2020 18:00:04 +0000 (20:00 +0200)]
Make sure to join the child
bors[bot] [Sun, 28 Jun 2020 11:14:36 +0000 (11:14 +0000)]
Merge #5108
5108: Don't show ra_fixture param hints r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 28 Jun 2020 11:11:41 +0000 (13:11 +0200)]
Don't show ra_fixture param hints
bors[bot] [Sun, 28 Jun 2020 01:04:54 +0000 (01:04 +0000)]
Merge #5104
5104: Simplify r=matklad a=Veetaha
Co-authored-by: Veetaha <veetaha2@gmail.com>
Veetaha [Sun, 28 Jun 2020 01:02:03 +0000 (04:02 +0300)]
Simlify with matches!()
Aleksey Kladov [Sat, 27 Jun 2020 23:23:32 +0000 (01:23 +0200)]
Update crates/rust-analyzer/src/handlers.rs
Co-authored-by: Veetaha <veetaha2@gmail.com>
Veetaha [Sat, 27 Jun 2020 22:30:45 +0000 (01:30 +0300)]
Simplify
Aleksey Kladov [Sat, 27 Jun 2020 19:35:52 +0000 (21:35 +0200)]
Fix potential overflow
Aleksey Kladov [Sat, 27 Jun 2020 19:33:14 +0000 (21:33 +0200)]
style
Aleksey Kladov [Sat, 27 Jun 2020 19:13:49 +0000 (21:13 +0200)]
Add colors
bors[bot] [Sat, 27 Jun 2020 19:10:56 +0000 (19:10 +0000)]
Merge #5102
5102: Add support for include_bytes! r=edwin0cheng a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Aleksey Kladov [Sat, 27 Jun 2020 18:45:59 +0000 (20:45 +0200)]
Remove fragile test
This test needs to be updated after every change (it contains line
number), which is annoying.
It also fails on windows due to \, so it's easier to remove it.
Aleksey Kladov [Sat, 27 Jun 2020 18:45:04 +0000 (20:45 +0200)]
Update crates/expect/src/lib.rs
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
Aleksey Kladov [Sat, 27 Jun 2020 17:55:54 +0000 (19:55 +0200)]
Update crates/expect/src/lib.rs
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
Laurențiu Nicola [Sat, 27 Jun 2020 18:02:47 +0000 (21:02 +0300)]
Add support for include_bytes
Aleksey Kladov [Sat, 27 Jun 2020 16:21:26 +0000 (18:21 +0200)]
Add example expect test for goto definition
Aleksey Kladov [Sat, 27 Jun 2020 15:53:50 +0000 (17:53 +0200)]
Add light-weight snapshot testing library with editor integration
bors[bot] [Sat, 27 Jun 2020 16:36:38 +0000 (16:36 +0000)]
Merge #5100
5100: Add support for include_str r=edwin0cheng a=lnicola
r? @edwin0cheng
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Sat, 27 Jun 2020 12:31:19 +0000 (15:31 +0300)]
Add support for include_str
bors[bot] [Sat, 27 Jun 2020 16:03:29 +0000 (16:03 +0000)]
Merge #4587
4587: Add "missing unsafe" diagnostics r=Nashenas88 a=Nashenas88
Addresses #190
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Paul Daniel Faria [Sat, 27 Jun 2020 16:02:49 +0000 (12:02 -0400)]
Remove html from gitignore so highlight snapshots are not ignored
Paul Daniel Faria [Sat, 27 Jun 2020 16:00:46 +0000 (12:00 -0400)]
Simplify unsafe expr collection match
Paul Daniel Faria [Sat, 27 Jun 2020 15:55:54 +0000 (11:55 -0400)]
Improve perf of finding unsafe exprs
Paul Daniel Faria [Sat, 27 Jun 2020 15:20:02 +0000 (11:20 -0400)]
Remove unneeded code, filename from tests, fix rebasing issues
Paul Daniel Faria [Tue, 2 Jun 2020 23:09:51 +0000 (19:09 -0400)]
Cleanup changes leftover from previous tracking attempt
Paul Daniel Faria [Tue, 2 Jun 2020 22:58:42 +0000 (18:58 -0400)]
Revert ide highlighting changes (addressing on another branch)
Paul Daniel Faria [Tue, 2 Jun 2020 22:44:04 +0000 (18:44 -0400)]
Remove track_parent and parent_map, replace with simple walk in missign unsafe validator
Paul Daniel Faria [Tue, 2 Jun 2020 22:04:23 +0000 (18:04 -0400)]
Fix issues caused during rebase
Paul Daniel Faria [Fri, 29 May 2020 12:55:47 +0000 (08:55 -0400)]
unsafe: Clean up, improve tracking, add debug_assert
Move unsafe_expressions to unsafe_validation.rs, replace vec tracking of
child exprs with inline macro, add debug assert to ensure tracked
children match walked children exactly
Paul Daniel Faria [Thu, 28 May 2020 13:30:19 +0000 (09:30 -0400)]
Add HighlightTag::Operator, use it for unsafe deref. Move unsafe validation to its own file
Paul Daniel Faria [Thu, 28 May 2020 02:37:23 +0000 (22:37 -0400)]
Account for deref token in syntax highlighting of unsafe, add test for that case
Paul Daniel Faria [Thu, 28 May 2020 02:21:20 +0000 (22:21 -0400)]
Track expr parents during lowering, use parent map when checking if unsafe exprs are within unsafe blocks
Paul Daniel Faria [Wed, 27 May 2020 12:51:08 +0000 (08:51 -0400)]
Address review comments, have MissingUnsafe diagnostic point to each unsafe use, update tests
Paul Daniel Faria [Sun, 24 May 2020 20:28:02 +0000 (16:28 -0400)]
Rename Expr::UnsafeBlock to Expr::Unsafe
Paul Daniel Faria [Sun, 24 May 2020 20:24:36 +0000 (16:24 -0400)]
Track unsafe blocks, don't trigger missing unsafe diagnostic when unsafe exprs within unsafe block
Paul Daniel Faria [Sun, 24 May 2020 19:31:33 +0000 (15:31 -0400)]
Add missing self param to test
Paul Daniel Faria [Sun, 24 May 2020 17:20:03 +0000 (13:20 -0400)]
Fix typo in test
Paul Daniel Faria [Sun, 24 May 2020 17:18:31 +0000 (13:18 -0400)]
Remove UnnecessaryUnsafe diagnostic, Fix Expr::Call unsafe analysis
Paul Daniel Faria [Sun, 24 May 2020 06:10:34 +0000 (02:10 -0400)]
Add tests covering unsafe blocks, more attempts to get call expr tests passing
Paul Daniel Faria [Sun, 24 May 2020 05:33:22 +0000 (01:33 -0400)]
Move diagnostics back into expr, add tests for diagnostics, fix logic to account for derefs of raw ptrs
Paul Daniel Faria [Sat, 23 May 2020 21:49:53 +0000 (17:49 -0400)]
Add unsafe diagnostics and unsafe highlighting
bors[bot] [Sat, 27 Jun 2020 12:34:32 +0000 (12:34 +0000)]
Merge #5099
5099: Escape space in path for MacOS binary location r=matklad a=LeSeulArtichaut
This makes it possible and easier to copy paste the path to the binary server, without needing to add quotes.
Co-authored-by: LeSeulArtichaut <leseulartichaut@gmail.com>
LeSeulArtichaut [Sat, 27 Jun 2020 12:13:14 +0000 (14:13 +0200)]
Escape space in path for MacOS binary location
David Lattimore [Sat, 27 Jun 2020 11:26:28 +0000 (21:26 +1000)]
Fix SSR prompt following #4919
bors[bot] [Sat, 27 Jun 2020 11:00:51 +0000 (11:00 +0000)]
Merge #5090
5090: Bump deps r=matklad a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Sat, 27 Jun 2020 07:26:28 +0000 (10:26 +0300)]
Bump rustc_lexer
Laurențiu Nicola [Sat, 27 Jun 2020 07:09:47 +0000 (10:09 +0300)]
Bump deps
David Lattimore [Sat, 27 Jun 2020 10:34:21 +0000 (20:34 +1000)]
Fix handling of whitespace when applying SSR within macro expansions.
I originally did replacement by passing in the full file text. Then as some point I thought I could do without it. Turns out calling .text() on a node coming from a macro expansion isn't a great idea, especially when you then try and use ranges from the original source to cut that text. The test I added here actually panics without the rest of this change (sorry I didn't notice sooner).
bors[bot] [Sat, 27 Jun 2020 10:26:54 +0000 (10:26 +0000)]
Merge #5095
5095: Add `::` to label for `crate::` completion r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 27 Jun 2020 10:25:08 +0000 (12:25 +0200)]
Add `::` to label for `crate::` completion
bors[bot] [Sat, 27 Jun 2020 10:11:00 +0000 (10:11 +0000)]
Merge #5094
5094: cleanup r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 27 Jun 2020 10:07:48 +0000 (12:07 +0200)]
cleanup
bors[bot] [Sat, 27 Jun 2020 09:50:08 +0000 (09:50 +0000)]
Merge #4982
4982: Bump chalk r=matklad a=lnicola
This passes the tests, but fails in a weird way on `analysis-stats`:
```
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/me/.cargo/registry/src/github.com-
1ecc6299db9ec823 /chalk-solve-0.14.0/src/clauses/builtin_traits/fn_family.rs:96:20
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-
1ecc6299db9ec823 /backtrace-0.3.46/src/backtrace/libunwind.rs:86
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-
1ecc6299db9ec823 /backtrace-0.3.46/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:78
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:59
4: core::fmt::write
at src/libcore/fmt/mod.rs:1076
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1537
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:62
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:198
9: std::panicking::default_hook
at src/libstd/panicking.rs:218
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:477
11: rust_begin_unwind
at src/libstd/panicking.rs:385
12: core::panicking::panic_fmt
at src/libcore/panicking.rs:86
13: core::panicking::panic
at src/libcore/panicking.rs:51
14: chalk_solve::clauses::builtin_traits::fn_family::add_fn_trait_program_clauses
15: chalk_solve::clauses::builder::ClauseBuilder<I>::push_binders
16: chalk_solve::clauses::program_clauses_that_could_match
17: chalk_solve::clauses::program_clauses_for_goal
18: chalk_solve::recursive::Solver<I>::solve_new_subgoal
19: <chalk_solve::recursive::Solver<I> as chalk_solve::recursive::solve::SolveDatabase<I>>::solve_goal
20: chalk_solve::recursive::Solver<I>::solve_root_goal
21: chalk_solve::solve::Solver<I>::solve_limited
22: ra_hir_ty::traits::trait_solve_query
23: salsa::runtime::Runtime<DB>::execute_query_implementation
24: salsa::derived::slot::Slot<DB,Q,MP>::read_upgrade
25: salsa::derived::slot::Slot<DB,Q,MP>::read
26: <salsa::derived::DerivedStorage<DB,Q,MP> as salsa::plumbing::QueryStorageOps<DB,Q>>::try_fetch
27: salsa::QueryTable<DB,Q>::get
28: <T as ra_hir_ty::db::HirDatabase>::trait_solve
29: ra_hir_ty::infer::InferenceContext::resolve_ty_as_possible
30: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
31: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_coerce
32: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::check_call_arguments
33: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_method_call
34: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
35: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr
36: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_method_call
37: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
38: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_coerce
39: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
40: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
41: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_coerce
42: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
43: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_coerce
44: ra_hir_ty::infer::infer_query
45: salsa::runtime::Runtime<DB>::execute_query_implementation
46: salsa::derived::slot::Slot<DB,Q,MP>::read_upgrade
47: salsa::derived::slot::Slot<DB,Q,MP>::read
48: <salsa::derived::DerivedStorage<DB,Q,MP> as salsa::plumbing::QueryStorageOps<DB,Q>>::try_fetch
49: ra_hir_ty::db::infer_wait
50: rust_analyzer::cli::analysis_stats::analysis_stats
51: rust_analyzer::main
52: std::rt::lang_start::{{closure}}
53: std::rt::lang_start_internal::{{closure}}
at src/libstd/rt.rs:52
54: std::panicking::try::do_call
at src/libstd/panicking.rs:297
55: std::panicking::try
at src/libstd/panicking.rs:274
56: std::panic::catch_unwind
at src/libstd/panic.rs:394
57: std::rt::lang_start_internal
at src/libstd/rt.rs:51
58: main
59: __libc_start_main
60: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```
It's as if we're returning `None` for a well-known trait that `chalk` asks about. That seems to happen for `Deref`, `CoerceUnsized` and `Try`.
r? @flodiebold
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
bors[bot] [Sat, 27 Jun 2020 09:43:08 +0000 (09:43 +0000)]
Merge #5007
5007: SSR: Allow matching within macro calls r=matklad a=davidlattimore
#3186
Co-authored-by: David Lattimore <dml@google.com>
bors[bot] [Sat, 27 Jun 2020 02:51:54 +0000 (02:51 +0000)]
Merge #5033
5033: Order of glob imports should not affect import shadowing r=Nashenas88 a=Nashenas88
Fixes #5032
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Paul Daniel Faria [Sat, 27 Jun 2020 02:51:13 +0000 (22:51 -0400)]
Replace simple is_named with matches macro
David Lattimore [Sat, 27 Jun 2020 01:31:15 +0000 (11:31 +1000)]
Fix test following change to fixture parsing (
d016cb486738c1ab2574a322924183fa8a870b06 )
David Lattimore [Tue, 23 Jun 2020 08:59:18 +0000 (18:59 +1000)]
SSR: Allow matching within macro calls
bors[bot] [Sat, 27 Jun 2020 00:05:02 +0000 (00:05 +0000)]
Merge #5088
5088: Better exe probing r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 27 Jun 2020 00:00:08 +0000 (02:00 +0200)]
Better exe probing
bors[bot] [Fri, 26 Jun 2020 23:31:42 +0000 (23:31 +0000)]
Merge #5087
5087: Try to find rustfmt in more places r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 26 Jun 2020 23:28:06 +0000 (01:28 +0200)]
Try to find rustfmt in more places
bors[bot] [Fri, 26 Jun 2020 23:25:05 +0000 (23:25 +0000)]
Merge #5086
5086: introduce_variable -> extract_variable r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 26 Jun 2020 23:21:43 +0000 (01:21 +0200)]
introduce_variable -> extract_variable