rust/compiler
Dylan DPC 74aa55b3fc
Rollup merge of #97798 - WaffleLapkin:allow_for_suggestions_that_are_quite_far_away_from_each_other, r=estebank
Hide irrelevant lines in suggestions to allow for suggestions that are far from each other to be shown

This is an attempt to fix suggestions one part of which is 6 lines or more far from the first. I've noticed "the problem" (of not showing some parts of the suggestion) here: https://github.com/rust-lang/rust/pull/97759#discussion_r889689230.

I'm not sure about the implementation (this big closure is just bad and makes already complicated code even more so), but I want to at least discuss the result.

Here is an example of how this changes the output:

Before:
```text
help: consider enclosing expression in a block
  |
3 ~     'l: { match () { () => break 'l,
4 |
5 |
6 |
7 |
8 |
...
```

After:
```text
help: consider enclosing expression in a block
  |
3 ~     'l: { match () { () => break 'l,
4 |
...
31|
32~ } };
  |
```

r? `@estebank`
`@rustbot` label +A-diagnostics +A-suggestion-diagnostics
2022-06-17 12:21:48 +02:00
..
rustc Rollup merge of #97385 - oli-obk:smir-tool-lib, r=pnkfelix 2022-06-14 07:47:24 +09:00
rustc_apfloat Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rustc_arena mark FIXMES for all the places found that are probably offset_from 2022-03-29 20:18:28 -04:00
rustc_ast Rename rustc_serialize::opaque::Encoder as MemEncoder. 2022-06-14 14:52:01 +10:00
rustc_ast_lowering Rollup merge of #98119 - EdwinRy:path-parenthesized-type-error, r=estebank 2022-06-16 07:24:43 +09:00
rustc_ast_passes Auto merge of #97842 - notriddle:notriddle/tuple-docs, r=jsha,GuillaumeGomez 2022-06-16 11:13:30 +00:00
rustc_ast_pretty Revert #96682. 2022-06-02 11:22:16 +10:00
rustc_attr Remove rustc_deprecated diagnostics 2022-06-14 19:46:13 -04:00
rustc_borrowck Rollup merge of #98110 - cjgillot:closure-brace, r=Aaron1011 2022-06-15 19:37:14 +09:00
rustc_builtin_macros [RFC 2011] Minimal initial implementation 2022-06-15 07:37:40 -03:00
rustc_codegen_cranelift Rollup merge of #97675 - nvzqz:unsized-needs-drop, r=dtolnay 2022-06-17 07:16:55 +09:00
rustc_codegen_gcc Rollup merge of #97675 - nvzqz:unsized-needs-drop, r=dtolnay 2022-06-17 07:16:55 +09:00
rustc_codegen_llvm Rollup merge of #97757 - xFrednet:rfc-2383-expect-with-force-warn, r=wesleywiser,flip1995 2022-06-16 09:10:20 +02:00
rustc_codegen_ssa Auto merge of #98160 - nnethercote:mv-finish-out-of-Encoder, r=bjorn3 2022-06-17 05:13:07 +00:00
rustc_const_eval rebase 2022-06-14 17:57:51 +02:00
rustc_data_structures Rollup merge of #98083 - nnethercote:rename-Encoder, r=bjorn3 2022-06-15 12:02:04 +09:00
rustc_driver remove currently unused deps 2022-06-13 22:20:51 +03:00
rustc_error_codes Add comment for internal error codes 2022-06-12 19:52:49 -03:00
rustc_error_messages Rollup merge of #97948 - davidtwco:diagnostic-translation-lints, r=oli-obk 2022-06-14 10:35:31 +02:00
rustc_errors Rollup merge of #97798 - WaffleLapkin:allow_for_suggestions_that_are_quite_far_away_from_each_other, r=estebank 2022-06-17 12:21:48 +02:00
rustc_expand Rollup merge of #97757 - xFrednet:rfc-2383-expect-with-force-warn, r=wesleywiser,flip1995 2022-06-16 09:10:20 +02:00
rustc_feature Remove rustc_deprecated diagnostics 2022-06-14 19:46:13 -04:00
rustc_fs_util Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_graphviz Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rustc_hir Rollup merge of #98110 - cjgillot:closure-brace, r=Aaron1011 2022-06-15 19:37:14 +09:00
rustc_hir_pretty Make ExprKind::Closure a struct variant. 2022-06-12 00:16:27 +02:00
rustc_incremental Move finish out of the Encoder trait. 2022-06-16 16:20:32 +10:00
rustc_index Auto merge of #97863 - JakobDegen:bitset-choice, r=nnethercote 2022-06-17 07:35:22 +00:00
rustc_infer Rollup merge of #98110 - cjgillot:closure-brace, r=Aaron1011 2022-06-15 19:37:14 +09:00
rustc_interface Rollup merge of #98067 - klensy:compiler-deps2, r=Dylan-DPC 2022-06-15 12:02:02 +09:00
rustc_lexer Reduce max hash in raw strings from u16 to u8 2022-03-23 22:13:55 +01:00
rustc_lint Rollup merge of #97757 - xFrednet:rfc-2383-expect-with-force-warn, r=wesleywiser,flip1995 2022-06-16 09:10:20 +02:00
rustc_lint_defs Support lint expectations for --force-warn lints (RFC 2383) 2022-06-16 08:16:43 +02:00
rustc_llvm Add metadata generation for vtables when using VFE 2022-06-14 14:50:52 +02:00
rustc_log clippy::complexity fixes 2022-05-26 13:14:24 +02:00
rustc_macros Auto merge of #94732 - nnethercote:infallible-encoder, r=bjorn3 2022-06-08 10:24:12 +00:00
rustc_metadata Move finish out of the Encoder trait. 2022-06-16 16:20:32 +10:00
rustc_middle Rollup merge of #97757 - xFrednet:rfc-2383-expect-with-force-warn, r=wesleywiser,flip1995 2022-06-16 09:10:20 +02:00
rustc_mir_build compare_const_vals: add a special case for certain ranges. 2022-06-16 11:25:34 +10:00
rustc_mir_dataflow Auto merge of #97863 - JakobDegen:bitset-choice, r=nnethercote 2022-06-17 07:35:22 +00:00
rustc_mir_transform Auto merge of #97863 - JakobDegen:bitset-choice, r=nnethercote 2022-06-17 07:35:22 +00:00
rustc_monomorphize Rollup merge of #98067 - klensy:compiler-deps2, r=Dylan-DPC 2022-06-15 12:02:02 +09:00
rustc_parse Do not suggest adding semicolon/changing delimiters for macros in item position that originates in macros 2022-06-16 02:19:31 +00:00
rustc_parse_format Make rustc_parse_format compile on stable 2022-05-03 11:26:58 +02:00
rustc_passes Auto merge of #97842 - notriddle:notriddle/tuple-docs, r=jsha,GuillaumeGomez 2022-06-16 11:13:30 +00:00
rustc_plugin_impl remove currently unused deps 2022-06-13 22:20:51 +03:00
rustc_privacy Make ExprKind::Closure a struct variant. 2022-06-12 00:16:27 +02:00
rustc_query_impl Move finish out of the Encoder trait. 2022-06-16 16:20:32 +10:00
rustc_query_system Move finish out of the Encoder trait. 2022-06-16 16:20:32 +10:00
rustc_resolve Rollup merge of #98087 - TaKO8Ki:suggest-adding-macro-export, r=oli-obk 2022-06-15 12:02:05 +09:00
rustc_save_analysis Make ExprKind::Closure a struct variant. 2022-06-12 00:16:27 +02:00
rustc_serialize Move finish out of the Encoder trait. 2022-06-16 16:20:32 +10:00
rustc_session Rollup merge of #97757 - xFrednet:rfc-2383-expect-with-force-warn, r=wesleywiser,flip1995 2022-06-16 09:10:20 +02:00
rustc_smir Rustfmt 2022-06-02 10:29:00 +00:00
rustc_span Auto merge of #97842 - notriddle:notriddle/tuple-docs, r=jsha,GuillaumeGomez 2022-06-16 11:13:30 +00:00
rustc_symbol_mangling Rollup merge of #98067 - klensy:compiler-deps2, r=Dylan-DPC 2022-06-15 12:02:02 +09:00
rustc_target Disable has_thread_local due to weird issues in some programs 2022-06-13 20:45:25 -07:00
rustc_trait_selection Rollup merge of #98110 - cjgillot:closure-brace, r=Aaron1011 2022-06-15 19:37:14 +09:00
rustc_traits implement valtrees as the type-system representation for constant values 2022-06-14 16:07:11 +02:00
rustc_ty_utils implement valtrees as the type-system representation for constant values 2022-06-14 16:07:11 +02:00
rustc_type_ir Rename rustc_serialize::opaque::Encoder as MemEncoder. 2022-06-14 14:52:01 +10:00
rustc_typeck Rollup merge of #97964 - WaffleLapkin:fix_borrow_par_suggestions, r=compiler-errors 2022-06-16 07:24:39 +09:00