From 49a22a4245bd6dfd3646a6658e0f90a2ab0657ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Wed, 11 Dec 2024 21:48:33 +0000 Subject: [PATCH] Filter empty lines, comments and delimiters from previous to last multiline span rendering --- compiler/rustc_errors/src/emitter.rs | 6 +- .../ordering_mixed.default.stderr | 2 - .../undocumented_unsafe_blocks.default.stderr | 1 - ...undocumented_unsafe_blocks.disabled.stderr | 1 - .../ui/bind_instead_of_map_multipart.stderr | 1 - .../tests/ui/collapsible_else_if.stderr | 5 -- .../clippy/tests/ui/copy_iterator.stderr | 1 - .../clippy/tests/ui/crashes/ice-360.stderr | 2 - .../clippy/tests/ui/derivable_impls.stderr | 1 - .../ui/empty_line_after/doc_comments.stderr | 1 - src/tools/clippy/tests/ui/entry.stderr | 5 +- .../clippy/tests/ui/enum_variants.stderr | 1 - .../clippy/tests/ui/fallible_impl_from.stderr | 3 - .../clippy/tests/ui/if_same_then_else2.stderr | 2 - .../clippy/tests/ui/infinite_loops.stderr | 6 -- .../tests/ui/into_iter_without_iter.stderr | 8 +- src/tools/clippy/tests/ui/manual_find.stderr | 2 - .../clippy/tests/ui/manual_flatten.stderr | 1 - .../clippy/tests/ui/manual_let_else.stderr | 4 - .../clippy/tests/ui/manual_unwrap_or.stderr | 2 - src/tools/clippy/tests/ui/missing_doc.stderr | 1 - .../tests/ui/missing_fields_in_debug.stderr | 3 - .../ui/needless_for_each_unfixable.stderr | 1 - src/tools/clippy/tests/ui/never_loop.stderr | 2 - .../clippy/tests/ui/single_match_else.stderr | 6 +- src/tools/clippy/tests/ui/unit_cmp.stderr | 4 - .../tests/ui/unnecessary_lazy_eval.stderr | 1 - .../clippy/tests/ui/unnecessary_wraps.stderr | 3 - .../clippy/tests/ui/unwrap_in_result.stderr | 1 - .../clippy/tests/ui/while_let_loop.stderr | 2 - ...ustom_code_classes_in_docs-warning3.stderr | 2 - .../doctest/standalone-warning-2024.stderr | 2 - .../ice-generic-type-alias-105742.stderr | 2 - tests/rustdoc-ui/lints/check-attr.stderr | 14 ---- tests/rustdoc-ui/lints/check.stderr | 1 - tests/rustdoc-ui/unescaped_backticks.stderr | 4 - tests/ui/associated-types/issue-59324.stderr | 1 - ...block-control-flow-static-semantics.stderr | 1 - ...r-type-mismatch-in-closure-in-async.stderr | 1 - .../collapse-debuginfo-invalid.stderr | 1 - tests/ui/attributes/dump_def_parents.stderr | 4 - .../arrays-completely-captured.stderr | 2 - .../2229_closure_analysis/by_value.stderr | 2 - .../capture-analysis-1.stderr | 2 - .../capture-analysis-2.stderr | 2 - .../capture-analysis-3.stderr | 2 - .../capture-analysis-4.stderr | 2 - .../capture-disjoint-field-struct.stderr | 6 +- .../capture-disjoint-field-tuple.stderr | 6 +- .../capture-enums.stderr | 2 - .../deep-multilevel-struct.stderr | 2 - .../deep-multilevel-tuple.stderr | 2 - ...eature-gate-capture_disjoint_fields.stderr | 6 +- .../2229_closure_analysis/issue-87378.stderr | 6 +- .../2229_closure_analysis/issue-88476.stderr | 4 - .../match/patterns-capture-analysis.stderr | 15 +--- .../2229_closure_analysis/move_closure.stderr | 48 ++++-------- .../multilevel-path-2.stderr | 6 +- .../nested-closure.stderr | 2 - .../path-with-array-access.stderr | 6 +- .../preserve_field_drop_order.stderr | 6 -- .../2229_closure_analysis/repr_packed.stderr | 2 - .../simple-struct-min-capture.stderr | 2 - .../2229_closure_analysis/unsafe_ptr.stderr | 6 +- .../wild_patterns.stderr | 6 -- .../huge_multispan_highlight.ascii.svg | 74 +++++++++---------- .../huge_multispan_highlight.unicode.svg | 74 +++++++++---------- .../ui/const-generics/nested-type.min.stderr | 1 - .../evade-deduplication-issue-118612.stderr | 5 -- tests/ui/coroutine/issue-88653.stderr | 3 +- tests/ui/coroutine/match-bindings.stderr | 1 - .../ui/coroutine/yield-in-initializer.stderr | 1 - tests/ui/diagnostic-width/E0271.ascii.stderr | 1 - .../ui/diagnostic-width/E0271.unicode.stderr | 1 - .../ui/drop/lint-tail-expr-drop-order.stderr | 12 --- ...43106-gating-of-builtin-attrs-error.stderr | 5 -- ...issue-43106-gating-of-builtin-attrs.stderr | 5 -- tests/ui/issues/issue-51714.stderr | 6 +- tests/ui/lint/lints-in-foreign-macros.stderr | 1 - .../ui/match/match-incompat-type-semi.stderr | 3 +- .../ui/match/match-type-err-first-arm.stderr | 6 +- .../never_type/diverging-place-match.stderr | 3 +- tests/ui/or-patterns/missing-bindings.stderr | 1 - .../ui/privacy/effective_visibilities.stderr | 1 - .../effective_visibilities_invariants.stderr | 1 - tests/ui/privacy/issue-113860-1.stderr | 1 - tests/ui/privacy/issue-113860-2.stderr | 1 - tests/ui/privacy/issue-113860.stderr | 1 - .../never-place-isnt-diverging.stderr | 3 +- .../ui/return/return-match-array-const.stderr | 3 - ...-unadorned-extern-block.edition2024.stderr | 1 - .../stability-attribute-trait-impl.stderr | 1 - .../ui/suggestions/if-then-neeing-semi.stderr | 5 +- .../match-prev-arm-needing-semi.stderr | 5 +- ...try-operator-dont-suggest-semicolon.stderr | 1 - .../ice-120503-async-const-method.stderr | 2 - .../alignment/align-fail.stderr | 1 - ...ve_reprs_should_have_correct_length.stderr | 20 ----- ...ve-wrapper-types-bit-compatible-mut.stderr | 1 - ...sive-wrapper-types-bit-incompatible.stderr | 1 - .../references/unit-to-u8.stderr | 1 - tests/ui/transmutability/uninhabited.stderr | 5 -- tests/ui/typeck/issue-100285.stderr | 1 - 103 files changed, 115 insertions(+), 401 deletions(-) diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 9595790d574c9..04b18b92a0c81 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -3064,7 +3064,11 @@ impl FileWithAnnotatedLines { add_annotation_to_file(&mut output, Lrc::clone(&file), line, ann.as_line()); } let line_end = ann.line_end - 1; - if middle < line_end { + let end_is_empty = file.get_line(line_end - 1).map_or(false, |s| { + let s = s.trim(); + ["", "{", "}", "(", ")", "[", "]"].contains(&s) || s.starts_with("//") + }); + if middle < line_end && !end_is_empty { add_annotation_to_file(&mut output, Lrc::clone(&file), line_end, ann.as_line()); } } else { diff --git a/src/tools/clippy/tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.default.stderr b/src/tools/clippy/tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.default.stderr index 062bf25ea624c..ee2868869deb5 100644 --- a/src/tools/clippy/tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.default.stderr +++ b/src/tools/clippy/tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.default.stderr @@ -20,7 +20,6 @@ LL | | fn clone_self(&self) -> Self { LL | | Self { LL | | a: true, ... | -LL | | } LL | | } | |_^ | @@ -32,7 +31,6 @@ LL | | fn default() -> Self { LL | | Self { LL | | a: true, ... | -LL | | } LL | | } | |_^ diff --git a/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.default.stderr b/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.default.stderr index a44c810b13502..9677beeb2c24a 100644 --- a/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.default.stderr +++ b/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.default.stderr @@ -286,7 +286,6 @@ LL | | if unsafe { true } { LL | | todo!(); LL | | } else { ... | -LL | | } LL | | }; | |______^ | diff --git a/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.disabled.stderr b/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.disabled.stderr index db5ea5b628902..0eccdd4280086 100644 --- a/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.disabled.stderr +++ b/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.disabled.stderr @@ -294,7 +294,6 @@ LL | | if unsafe { true } { LL | | todo!(); LL | | } else { ... | -LL | | } LL | | }; | |______^ | diff --git a/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr b/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr index 2adaecc96d6a9..d271381adea2a 100644 --- a/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr +++ b/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr @@ -44,7 +44,6 @@ LL | | if { LL | | if s == "43" { LL | | return Some(43); ... | -LL | | } LL | | }); | |______^ | diff --git a/src/tools/clippy/tests/ui/collapsible_else_if.stderr b/src/tools/clippy/tests/ui/collapsible_else_if.stderr index c27a2967f3c2d..45566a78bd81d 100644 --- a/src/tools/clippy/tests/ui/collapsible_else_if.stderr +++ b/src/tools/clippy/tests/ui/collapsible_else_if.stderr @@ -44,7 +44,6 @@ LL | } else { LL | | if y == "world" { LL | | println!("world") ... | -LL | | } LL | | } | |_____^ | @@ -66,7 +65,6 @@ LL | } else { LL | | if let Some(42) = Some(42) { LL | | println!("world") ... | -LL | | } LL | | } | |_____^ | @@ -88,7 +86,6 @@ LL | } else { LL | | if let Some(42) = Some(42) { LL | | println!("world") ... | -LL | | } LL | | } | |_____^ | @@ -110,7 +107,6 @@ LL | } else { LL | | if x == "hello" { LL | | println!("world") ... | -LL | | } LL | | } | |_____^ | @@ -132,7 +128,6 @@ LL | } else { LL | | if let Some(42) = Some(42) { LL | | println!("world") ... | -LL | | } LL | | } | |_____^ | diff --git a/src/tools/clippy/tests/ui/copy_iterator.stderr b/src/tools/clippy/tests/ui/copy_iterator.stderr index 990b1ce628dec..2f6378a85feea 100644 --- a/src/tools/clippy/tests/ui/copy_iterator.stderr +++ b/src/tools/clippy/tests/ui/copy_iterator.stderr @@ -6,7 +6,6 @@ LL | | LL | | LL | | type Item = u8; ... | -LL | | } LL | | } | |_^ | diff --git a/src/tools/clippy/tests/ui/crashes/ice-360.stderr b/src/tools/clippy/tests/ui/crashes/ice-360.stderr index d37e0216edf40..9961eb21485da 100644 --- a/src/tools/clippy/tests/ui/crashes/ice-360.stderr +++ b/src/tools/clippy/tests/ui/crashes/ice-360.stderr @@ -3,7 +3,6 @@ error: this loop never actually loops | LL | / loop { ... | -LL | | LL | | } | |_____^ | @@ -14,7 +13,6 @@ error: this loop could be written as a `while let` loop | LL | / loop { ... | -LL | | LL | | } | |_____^ help: try: `while let Some(ele) = iter.next() { .. }` | diff --git a/src/tools/clippy/tests/ui/derivable_impls.stderr b/src/tools/clippy/tests/ui/derivable_impls.stderr index c22569145bdb2..0caea892358a0 100644 --- a/src/tools/clippy/tests/ui/derivable_impls.stderr +++ b/src/tools/clippy/tests/ui/derivable_impls.stderr @@ -6,7 +6,6 @@ LL | | fn default() -> Self { LL | | Self { LL | | a: false, ... | -LL | | } LL | | } | |_^ | diff --git a/src/tools/clippy/tests/ui/empty_line_after/doc_comments.stderr b/src/tools/clippy/tests/ui/empty_line_after/doc_comments.stderr index 475a817eff9ab..c4d4dde7f73fe 100644 --- a/src/tools/clippy/tests/ui/empty_line_after/doc_comments.stderr +++ b/src/tools/clippy/tests/ui/empty_line_after/doc_comments.stderr @@ -97,7 +97,6 @@ error: empty lines after doc comment | LL | / /// for OldA ... | -LL | | // struct OldB; LL | | | |_^ ... diff --git a/src/tools/clippy/tests/ui/entry.stderr b/src/tools/clippy/tests/ui/entry.stderr index fb4676766066a..4b6bd3b4a2587 100644 --- a/src/tools/clippy/tests/ui/entry.stderr +++ b/src/tools/clippy/tests/ui/entry.stderr @@ -16,8 +16,7 @@ LL | / if !m.contains_key(&k) { LL | | if true { LL | | m.insert(k, v); LL | | } else { -LL | | m.insert(k, v2); -LL | | } +... | LL | | } | |_____^ | @@ -63,7 +62,6 @@ LL | | if true { LL | | m.insert(k, v); LL | | } else { ... | -LL | | } LL | | } | |_____^ | @@ -154,7 +152,6 @@ LL | | foo(); LL | | match 0 { LL | | 0 if false => { ... | -LL | | } LL | | } | |_____^ | diff --git a/src/tools/clippy/tests/ui/enum_variants.stderr b/src/tools/clippy/tests/ui/enum_variants.stderr index c118ac80a92be..ecca6c833ac55 100644 --- a/src/tools/clippy/tests/ui/enum_variants.stderr +++ b/src/tools/clippy/tests/ui/enum_variants.stderr @@ -45,7 +45,6 @@ LL | / enum Food { LL | | LL | | FoodGood, ... | -LL | | LL | | } | |_^ | diff --git a/src/tools/clippy/tests/ui/fallible_impl_from.stderr b/src/tools/clippy/tests/ui/fallible_impl_from.stderr index 62496148924e1..cc3739031b76e 100644 --- a/src/tools/clippy/tests/ui/fallible_impl_from.stderr +++ b/src/tools/clippy/tests/ui/fallible_impl_from.stderr @@ -29,7 +29,6 @@ LL | | LL | | fn from(i: usize) -> Invalid { LL | | if i != 42 { ... | -LL | | } LL | | } | |_^ | @@ -49,7 +48,6 @@ LL | | LL | | fn from(s: Option) -> Invalid { LL | | let s = s.unwrap(); ... | -LL | | } LL | | } | |_^ | @@ -76,7 +74,6 @@ LL | | LL | | fn from(s: &'a mut as ProjStrTrait>::ProjString) -> Invalid { LL | | if s.parse::().ok().unwrap() != 42 { ... | -LL | | } LL | | } | |_^ | diff --git a/src/tools/clippy/tests/ui/if_same_then_else2.stderr b/src/tools/clippy/tests/ui/if_same_then_else2.stderr index 93507eb2c6fde..369d6f6673722 100644 --- a/src/tools/clippy/tests/ui/if_same_then_else2.stderr +++ b/src/tools/clippy/tests/ui/if_same_then_else2.stderr @@ -7,7 +7,6 @@ LL | | for _ in &[42] { LL | | let foo: &Option<_> = &Some::(42); LL | | if foo.is_some() { ... | -LL | | } LL | | } else { | |_____^ | @@ -20,7 +19,6 @@ LL | | for _ in &[42] { LL | | let bar: &Option<_> = &Some::(42); LL | | if bar.is_some() { ... | -LL | | } LL | | } | |_____^ = note: `-D clippy::if-same-then-else` implied by `-D warnings` diff --git a/src/tools/clippy/tests/ui/infinite_loops.stderr b/src/tools/clippy/tests/ui/infinite_loops.stderr index 5b5cd78108e47..ac7b25323d235 100644 --- a/src/tools/clippy/tests/ui/infinite_loops.stderr +++ b/src/tools/clippy/tests/ui/infinite_loops.stderr @@ -37,7 +37,6 @@ LL | / loop { LL | | LL | | loop { ... | -LL | | } LL | | } | |_________^ | @@ -94,7 +93,6 @@ LL | | LL | | loop { LL | | if cond { ... | -LL | | } LL | | } | |_____^ | @@ -111,7 +109,6 @@ LL | | LL | | 'inner: loop { LL | | loop { ... | -LL | | } LL | | } | |_____^ | @@ -142,7 +139,6 @@ LL | | LL | | 'inner: loop { LL | | loop { ... | -LL | | } LL | | } | |_________^ | @@ -159,7 +155,6 @@ LL | | LL | | match opt { LL | | Some(v) => { ... | -LL | | } LL | | } | |_____^ | @@ -276,7 +271,6 @@ LL | | LL | | 'inner: loop { LL | | loop { ... | -LL | | } LL | | } | |_____^ | diff --git a/src/tools/clippy/tests/ui/into_iter_without_iter.stderr b/src/tools/clippy/tests/ui/into_iter_without_iter.stderr index 533a7f6859354..cde1b60c2abcf 100644 --- a/src/tools/clippy/tests/ui/into_iter_without_iter.stderr +++ b/src/tools/clippy/tests/ui/into_iter_without_iter.stderr @@ -6,7 +6,6 @@ LL | | LL | | type IntoIter = std::slice::Iter<'a, u8>; LL | | type Item = &'a u8; ... | -LL | | } LL | | } | |_^ | @@ -30,7 +29,6 @@ LL | | LL | | type IntoIter = std::slice::IterMut<'a, u8>; LL | | type Item = &'a mut u8; ... | -LL | | } LL | | } | |_^ | @@ -52,7 +50,6 @@ LL | | LL | | type IntoIter = std::slice::Iter<'a, T>; LL | | type Item = &'a T; ... | -LL | | } LL | | } | |_^ | @@ -74,7 +71,6 @@ LL | | LL | | type IntoIter = std::slice::IterMut<'a, T>; LL | | type Item = &'a mut T; ... | -LL | | } LL | | } | |_^ | @@ -96,7 +92,6 @@ LL | | LL | | type IntoIter = std::slice::IterMut<'a, T>; LL | | type Item = &'a mut T; ... | -LL | | } LL | | } | |_^ | @@ -117,8 +112,7 @@ LL | / impl<'a> IntoIterator for &'a Issue12037 { LL | | type IntoIter = std::slice::Iter<'a, u8>; LL | | type Item = &'a u8; LL | | fn into_iter(self) -> Self::IntoIter { -LL | | todo!() -LL | | } +... | LL | | } | |_________^ ... diff --git a/src/tools/clippy/tests/ui/manual_find.stderr b/src/tools/clippy/tests/ui/manual_find.stderr index eb55a0c11f244..a4e7878a247c1 100644 --- a/src/tools/clippy/tests/ui/manual_find.stderr +++ b/src/tools/clippy/tests/ui/manual_find.stderr @@ -6,7 +6,6 @@ LL | | LL | | LL | | if s == String::new() { ... | -LL | | } LL | | None | |________^ help: replace with an iterator: `strings.into_iter().find(|s| s == String::new())` | @@ -22,7 +21,6 @@ LL | | LL | | LL | | if s == String::new() { ... | -LL | | } LL | | None | |________^ help: replace with an iterator: `arr.into_iter().map(|(s, _)| s).find(|s| s == String::new())` | diff --git a/src/tools/clippy/tests/ui/manual_flatten.stderr b/src/tools/clippy/tests/ui/manual_flatten.stderr index 3b64d9ef859d6..cf1b0a1c8bbf6 100644 --- a/src/tools/clippy/tests/ui/manual_flatten.stderr +++ b/src/tools/clippy/tests/ui/manual_flatten.stderr @@ -184,7 +184,6 @@ LL | | LL | | Some(1), LL | | Some(2), ... | -LL | | } LL | | } | |_____^ | diff --git a/src/tools/clippy/tests/ui/manual_let_else.stderr b/src/tools/clippy/tests/ui/manual_let_else.stderr index 55a410982adfd..dcd5d4561113b 100644 --- a/src/tools/clippy/tests/ui/manual_let_else.stderr +++ b/src/tools/clippy/tests/ui/manual_let_else.stderr @@ -148,7 +148,6 @@ LL | | LL | | v_some LL | | } else { ... | -LL | | } LL | | }; | |______^ | @@ -175,7 +174,6 @@ LL | | LL | | v_some LL | | } else { ... | -LL | | } LL | | }; | |______^ | @@ -197,7 +195,6 @@ LL | | LL | | v_some LL | | } else { ... | -LL | | } LL | | }; | |______^ | @@ -306,7 +303,6 @@ LL | | LL | | v_some LL | | } else { ... | -LL | | } LL | | }; | |______^ | diff --git a/src/tools/clippy/tests/ui/manual_unwrap_or.stderr b/src/tools/clippy/tests/ui/manual_unwrap_or.stderr index c93a8952a0805..a5a64ecb9a3e0 100644 --- a/src/tools/clippy/tests/ui/manual_unwrap_or.stderr +++ b/src/tools/clippy/tests/ui/manual_unwrap_or.stderr @@ -36,7 +36,6 @@ LL | | Some(i) => i, LL | | None => { LL | | 42 + 42 ... | -LL | | } LL | | }; | |_____^ | @@ -130,7 +129,6 @@ LL | | Ok(i) => i, LL | | Err(_) => { LL | | 42 + 42 ... | -LL | | } LL | | }; | |_____^ | diff --git a/src/tools/clippy/tests/ui/missing_doc.stderr b/src/tools/clippy/tests/ui/missing_doc.stderr index 133c76ac9d438..6554eed161062 100644 --- a/src/tools/clippy/tests/ui/missing_doc.stderr +++ b/src/tools/clippy/tests/ui/missing_doc.stderr @@ -72,7 +72,6 @@ LL | | /// dox LL | | pub fn documented() {} LL | | pub fn undocumented1() {} ... | -LL | | } LL | | } | |_^ diff --git a/src/tools/clippy/tests/ui/missing_fields_in_debug.stderr b/src/tools/clippy/tests/ui/missing_fields_in_debug.stderr index 8c1810909dd86..5e51194c4b372 100644 --- a/src/tools/clippy/tests/ui/missing_fields_in_debug.stderr +++ b/src/tools/clippy/tests/ui/missing_fields_in_debug.stderr @@ -6,7 +6,6 @@ LL | | LL | | // unused field: hidden LL | | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { ... | -LL | | } LL | | } | |_^ | @@ -28,7 +27,6 @@ LL | | LL | | // unused fields: hidden, hidden2, hidden4 LL | | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { ... | -LL | | } LL | | } | |_^ | @@ -58,7 +56,6 @@ LL | | LL | | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { LL | | let mut f = formatter.debug_struct("MultiExprDebugImpl"); ... | -LL | | } LL | | } | |_^ | diff --git a/src/tools/clippy/tests/ui/needless_for_each_unfixable.stderr b/src/tools/clippy/tests/ui/needless_for_each_unfixable.stderr index 9d3f639efbf27..682140a1dfdaa 100644 --- a/src/tools/clippy/tests/ui/needless_for_each_unfixable.stderr +++ b/src/tools/clippy/tests/ui/needless_for_each_unfixable.stderr @@ -6,7 +6,6 @@ LL | | LL | | LL | | if *v == 10 { ... | -LL | | } LL | | }); | |_______^ | diff --git a/src/tools/clippy/tests/ui/never_loop.stderr b/src/tools/clippy/tests/ui/never_loop.stderr index bd9bdc4addbb5..dab3488af106f 100644 --- a/src/tools/clippy/tests/ui/never_loop.stderr +++ b/src/tools/clippy/tests/ui/never_loop.stderr @@ -72,7 +72,6 @@ LL | | LL | | // never loops LL | | match x { ... | -LL | | } LL | | } | |_____^ | @@ -123,7 +122,6 @@ LL | | LL | | 'b: { LL | | break 'b 'c: { ... | -LL | | } LL | | } | |_____^ diff --git a/src/tools/clippy/tests/ui/single_match_else.stderr b/src/tools/clippy/tests/ui/single_match_else.stderr index a2801751a430a..aa494520b8419 100644 --- a/src/tools/clippy/tests/ui/single_match_else.stderr +++ b/src/tools/clippy/tests/ui/single_match_else.stderr @@ -68,8 +68,7 @@ LL | / match Result::::Ok(1) { LL | | Ok(a) => println!("${:?}", a), LL | | Err(_) => { LL | | println!("else block"); -LL | | return; -LL | | } +... | LL | | } | |_____^ | @@ -88,8 +87,7 @@ LL | / match Cow::from("moo") { LL | | Cow::Owned(a) => println!("${:?}", a), LL | | Cow::Borrowed(_) => { LL | | println!("else block"); -LL | | return; -LL | | } +... | LL | | } | |_____^ | diff --git a/src/tools/clippy/tests/ui/unit_cmp.stderr b/src/tools/clippy/tests/ui/unit_cmp.stderr index f9473d3be2627..9e067edb84679 100644 --- a/src/tools/clippy/tests/ui/unit_cmp.stderr +++ b/src/tools/clippy/tests/ui/unit_cmp.stderr @@ -34,7 +34,6 @@ LL | | LL | | { LL | | true; ... | -LL | | } LL | | ); | |_____^ @@ -46,7 +45,6 @@ LL | | LL | | { LL | | true; ... | -LL | | } LL | | ); | |_____^ @@ -58,7 +56,6 @@ LL | | LL | | { LL | | true; ... | -LL | | } LL | | ); | |_____^ @@ -70,7 +67,6 @@ LL | | LL | | { LL | | true; ... | -LL | | } LL | | ); | |_____^ diff --git a/src/tools/clippy/tests/ui/unnecessary_lazy_eval.stderr b/src/tools/clippy/tests/ui/unnecessary_lazy_eval.stderr index 27c064b8b7fe9..35a2144c389f2 100644 --- a/src/tools/clippy/tests/ui/unnecessary_lazy_eval.stderr +++ b/src/tools/clippy/tests/ui/unnecessary_lazy_eval.stderr @@ -435,7 +435,6 @@ error: unnecessary closure used to substitute value for `Result::Err` LL | let _: Result = res. | ___________________________________^ ... | -LL | | // some lines LL | | or_else(|_| Ok(ext_str.some_field)); | |_______________________________________^ | diff --git a/src/tools/clippy/tests/ui/unnecessary_wraps.stderr b/src/tools/clippy/tests/ui/unnecessary_wraps.stderr index 59986d895b30e..b304d4dce6ea9 100644 --- a/src/tools/clippy/tests/ui/unnecessary_wraps.stderr +++ b/src/tools/clippy/tests/ui/unnecessary_wraps.stderr @@ -6,7 +6,6 @@ LL | | LL | | LL | | if a && b { ... | -LL | | } LL | | } | |_^ | @@ -112,7 +111,6 @@ LL | | LL | | if a && b { LL | | return Some(()); ... | -LL | | } LL | | } | |_^ | @@ -139,7 +137,6 @@ LL | | LL | | if a && b { LL | | return Ok(()); ... | -LL | | } LL | | } | |_^ | diff --git a/src/tools/clippy/tests/ui/unwrap_in_result.stderr b/src/tools/clippy/tests/ui/unwrap_in_result.stderr index 752177aaca57e..201d4ae36ae3d 100644 --- a/src/tools/clippy/tests/ui/unwrap_in_result.stderr +++ b/src/tools/clippy/tests/ui/unwrap_in_result.stderr @@ -6,7 +6,6 @@ LL | | LL | | // checks whether a string represents a number divisible by 3 LL | | let i = i_str.parse::().unwrap(); ... | -LL | | } LL | | } | |_____^ | diff --git a/src/tools/clippy/tests/ui/while_let_loop.stderr b/src/tools/clippy/tests/ui/while_let_loop.stderr index 5212d4fdcc7b8..10c2311d82f7f 100644 --- a/src/tools/clippy/tests/ui/while_let_loop.stderr +++ b/src/tools/clippy/tests/ui/while_let_loop.stderr @@ -6,7 +6,6 @@ LL | | LL | | LL | | if let Some(_x) = y { ... | -LL | | } LL | | } | |_____^ help: try: `while let Some(_x) = y { .. }` | @@ -45,7 +44,6 @@ LL | | LL | | let x = match y { LL | | Some(x) => x, ... | -LL | | } LL | | } | |_____^ help: try: `while let Some(x) = y { .. }` diff --git a/tests/rustdoc-ui/custom_code_classes_in_docs-warning3.stderr b/tests/rustdoc-ui/custom_code_classes_in_docs-warning3.stderr index 829be4805a53a..a72e21fed8558 100644 --- a/tests/rustdoc-ui/custom_code_classes_in_docs-warning3.stderr +++ b/tests/rustdoc-ui/custom_code_classes_in_docs-warning3.stderr @@ -3,7 +3,6 @@ error: unclosed quote string `"` | LL | / /// ```{class="} ... | -LL | | /// main; LL | | /// ``` | |_______^ | @@ -19,7 +18,6 @@ error: unclosed quote string `"` | LL | / /// ```{class="} ... | -LL | | /// main; LL | | /// ``` | |_______^ | diff --git a/tests/rustdoc-ui/doctest/standalone-warning-2024.stderr b/tests/rustdoc-ui/doctest/standalone-warning-2024.stderr index 02b6c6ee43c41..662f07f3a4cc1 100644 --- a/tests/rustdoc-ui/doctest/standalone-warning-2024.stderr +++ b/tests/rustdoc-ui/doctest/standalone-warning-2024.stderr @@ -3,7 +3,6 @@ error: unknown attribute `standalone` | 11 | / //! ```standalone ... | -16 | | //! bla 17 | | //! ``` | |_______^ | @@ -21,7 +20,6 @@ error: unknown attribute `standalone-crate` | 11 | / //! ```standalone ... | -16 | | //! bla 17 | | //! ``` | |_______^ | diff --git a/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr b/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr index 5a718f46d952a..f9080bf07853f 100644 --- a/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr +++ b/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr @@ -311,11 +311,9 @@ LL | | ::Item, ... | LL | |/ Output = ::Item, ... || -LL | || LL | || Output = ::Item> as SVec>::Item, | ||_________________________________________________^ ...because it uses `Self` as a type parameter ... | -LL | | LL | | > { | |__^ ...because it uses `Self` as a type parameter help: consider using an opaque type instead diff --git a/tests/rustdoc-ui/lints/check-attr.stderr b/tests/rustdoc-ui/lints/check-attr.stderr index c45e94d9566ec..4576dea79cbdd 100644 --- a/tests/rustdoc-ui/lints/check-attr.stderr +++ b/tests/rustdoc-ui/lints/check-attr.stderr @@ -3,7 +3,6 @@ error: unknown attribute `compile-fail` | LL | / /// foo ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -20,7 +19,6 @@ error: unknown attribute `compilefail` | LL | / /// foo ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -32,7 +30,6 @@ error: unknown attribute `comPile_fail` | LL | / /// foo ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -44,7 +41,6 @@ error: unknown attribute `should-panic` | LL | / /// bar ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -56,7 +52,6 @@ error: unknown attribute `shouldpanic` | LL | / /// bar ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -68,7 +63,6 @@ error: unknown attribute `sHould_panic` | LL | / /// bar ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -80,7 +74,6 @@ error: unknown attribute `no-run` | LL | / /// foobar ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -92,7 +85,6 @@ error: unknown attribute `norun` | LL | / /// foobar ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -104,7 +96,6 @@ error: unknown attribute `no_Run` | LL | / /// foobar ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -116,7 +107,6 @@ error: unknown attribute `test-harness` | LL | / /// b ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -128,7 +118,6 @@ error: unknown attribute `testharness` | LL | / /// b ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -140,7 +129,6 @@ error: unknown attribute `teSt_harness` | LL | / /// b ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -162,7 +150,6 @@ error: unknown attribute `rust2018` | LL | / /// b ... | -LL | | /// boo LL | | /// ``` | |_______^ | @@ -173,7 +160,6 @@ error: unknown attribute `shouldpanic` | LL | / /// b ... | -LL | | /// boo LL | | /// ``` | |_______^ | diff --git a/tests/rustdoc-ui/lints/check.stderr b/tests/rustdoc-ui/lints/check.stderr index f1f36e8830d6d..dcdf25dda649c 100644 --- a/tests/rustdoc-ui/lints/check.stderr +++ b/tests/rustdoc-ui/lints/check.stderr @@ -6,7 +6,6 @@ LL | | LL | | LL | | #![warn(missing_docs)] ... | -LL | | LL | | pub fn foo() {} | |_______________^ | diff --git a/tests/rustdoc-ui/unescaped_backticks.stderr b/tests/rustdoc-ui/unescaped_backticks.stderr index d93aaf5f3ca94..01b2fd1fa272b 100644 --- a/tests/rustdoc-ui/unescaped_backticks.stderr +++ b/tests/rustdoc-ui/unescaped_backticks.stderr @@ -272,7 +272,6 @@ error: unescaped backtick | LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`], ... | -LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max LL | | /// level changes. | |______________________^ | @@ -288,7 +287,6 @@ error: unescaped backtick | LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`], ... | -LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max LL | | /// level changes. | |______________________^ | @@ -302,7 +300,6 @@ error: unescaped backtick | LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`], ... | -LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max LL | | /// level changes. | |______________________^ | @@ -318,7 +315,6 @@ error: unescaped backtick | LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`], ... | -LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max LL | | /// level changes. | |______________________^ | diff --git a/tests/ui/associated-types/issue-59324.stderr b/tests/ui/associated-types/issue-59324.stderr index 51379d678f1a2..805c3e60bb6a8 100644 --- a/tests/ui/associated-types/issue-59324.stderr +++ b/tests/ui/associated-types/issue-59324.stderr @@ -19,7 +19,6 @@ LL | | LL | | LL | | Service::OnlyFoo> ... | -LL | | LL | | } | |_^ the trait `Foo` is not implemented for `Bug` | diff --git a/tests/ui/async-await/async-block-control-flow-static-semantics.stderr b/tests/ui/async-await/async-block-control-flow-static-semantics.stderr index 3bc467cc84de9..4ed15a942c674 100644 --- a/tests/ui/async-await/async-block-control-flow-static-semantics.stderr +++ b/tests/ui/async-await/async-block-control-flow-static-semantics.stderr @@ -23,7 +23,6 @@ LL | | LL | | let block = async { LL | | return 0u8; ... | -LL | | LL | | } | |_^ expected `u8`, found `()` diff --git a/tests/ui/async-await/dont-ice-for-type-mismatch-in-closure-in-async.stderr b/tests/ui/async-await/dont-ice-for-type-mismatch-in-closure-in-async.stderr index 649a868faa5e9..b60f6a0833867 100644 --- a/tests/ui/async-await/dont-ice-for-type-mismatch-in-closure-in-async.stderr +++ b/tests/ui/async-await/dont-ice-for-type-mismatch-in-closure-in-async.stderr @@ -31,7 +31,6 @@ LL | | LL | | if true { LL | | false ... | -LL | | LL | | }) | |_____^ expected `bool`, found `Option<()>` | diff --git a/tests/ui/attributes/collapse-debuginfo-invalid.stderr b/tests/ui/attributes/collapse-debuginfo-invalid.stderr index 7cbbd1d647e71..70376f985cb12 100644 --- a/tests/ui/attributes/collapse-debuginfo-invalid.stderr +++ b/tests/ui/attributes/collapse-debuginfo-invalid.stderr @@ -45,7 +45,6 @@ LL | | let _ = #[collapse_debuginfo(yes)] || { }; LL | | LL | | #[collapse_debuginfo(yes)] ... | -LL | | } LL | | } | |_- not a macro definition diff --git a/tests/ui/attributes/dump_def_parents.stderr b/tests/ui/attributes/dump_def_parents.stderr index a928e8e33a4f7..74ecd9b0a8906 100644 --- a/tests/ui/attributes/dump_def_parents.stderr +++ b/tests/ui/attributes/dump_def_parents.stderr @@ -22,7 +22,6 @@ LL | | LL | | fn bar() { LL | | fn foo() { ... | -LL | | LL | | fn main() {} | |____________^ @@ -66,7 +65,6 @@ LL | | LL | | fn bar() { LL | | fn foo() { ... | -LL | | LL | | fn main() {} | |____________^ @@ -124,7 +122,6 @@ LL | | LL | | fn bar() { LL | | fn foo() { ... | -LL | | LL | | fn main() {} | |____________^ @@ -173,7 +170,6 @@ LL | | LL | | fn bar() { LL | | fn foo() { ... | -LL | | LL | | fn main() {} | |____________^ diff --git a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr index 3c4f2de73a420..cb351d3cebd40 100644 --- a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr +++ b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr @@ -16,7 +16,6 @@ LL | | LL | | LL | | m[0] += 10; ... | -LL | | LL | | }; | |_____^ | @@ -39,7 +38,6 @@ LL | | LL | | LL | | m[0] += 10; ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/by_value.stderr b/tests/ui/closures/2229_closure_analysis/by_value.stderr index f843b76d72343..af4ae34ad64e3 100644 --- a/tests/ui/closures/2229_closure_analysis/by_value.stderr +++ b/tests/ui/closures/2229_closure_analysis/by_value.stderr @@ -16,7 +16,6 @@ LL | | LL | | LL | | let p = t.0.0; ... | -LL | | LL | | }; | |_____^ | @@ -39,7 +38,6 @@ LL | | LL | | LL | | let p = t.0.0; ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr index 64ae704bc90ef..eef201792c634 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr @@ -16,7 +16,6 @@ LL | | LL | | LL | | println!("{:?}", p); ... | -LL | | LL | | }; | |_____^ | @@ -49,7 +48,6 @@ LL | | LL | | LL | | println!("{:?}", p); ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr index 40c075f3cc802..8fe4d2d57ab0a 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr @@ -16,7 +16,6 @@ LL | | LL | | LL | | let _x = p.x; ... | -LL | | LL | | }; | |_____^ | @@ -39,7 +38,6 @@ LL | | LL | | LL | | let _x = p.x; ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr index a4689f2ea969a..f1dbefe15d525 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr @@ -16,7 +16,6 @@ LL | | LL | | LL | | let _x = a.b.c; ... | -LL | | LL | | }; | |_____^ | @@ -39,7 +38,6 @@ LL | | LL | | LL | | let _x = a.b.c; ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr index 9d3004dbbb02d..91c3d6d16745e 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr @@ -16,7 +16,6 @@ LL | | LL | | LL | | let _x = a.b; ... | -LL | | LL | | }; | |_____^ | @@ -39,7 +38,6 @@ LL | | LL | | LL | | let _x = a.b; ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr index 48fbd682a5bca..c9c227335a9e6 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr @@ -15,8 +15,7 @@ LL | / || { LL | | LL | | LL | | println!("{}", p.x); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -33,8 +32,7 @@ LL | / || { LL | | LL | | LL | | println!("{}", p.x); -LL | | -LL | | +... | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr index 496511d60256d..84aac180fbb0c 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr @@ -15,8 +15,7 @@ LL | / || { LL | | LL | | LL | | println!("{}", t.0); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -33,8 +32,7 @@ LL | / || { LL | | LL | | LL | | println!("{}", t.0); -LL | | -LL | | +... | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/capture-enums.stderr b/tests/ui/closures/2229_closure_analysis/capture-enums.stderr index 2d70b6148583b..89a879cec468b 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-enums.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-enums.stderr @@ -26,7 +26,6 @@ LL | | LL | | LL | | if let Info::Point(_, _, str) = point { ... | -LL | | } LL | | }; | |_____^ | @@ -59,7 +58,6 @@ LL | | LL | | LL | | if let Info::Point(_, _, str) = point { ... | -LL | | } LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr index d118f7573a488..447ad8f4a68e1 100644 --- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr +++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr @@ -16,7 +16,6 @@ LL | | LL | | LL | | let x = &p.a.p.x; ... | -LL | | LL | | }; | |_____^ | @@ -44,7 +43,6 @@ LL | | LL | | LL | | let x = &p.a.p.x; ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr index cc5f74613e48f..639d1714721db 100644 --- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr +++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr @@ -16,7 +16,6 @@ LL | | LL | | LL | | let x = &t.0.0.0; ... | -LL | | LL | | }; | |_____^ | @@ -44,7 +43,6 @@ LL | | LL | | LL | | let x = &t.0.0.0; ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr index 6dbe8c153c012..3e4c4d3ccd39c 100644 --- a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr +++ b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr @@ -15,8 +15,7 @@ LL | / || { LL | | LL | | LL | | println!("This uses new capture analyysis to capture s={}", s); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -33,8 +32,7 @@ LL | / || { LL | | LL | | LL | | println!("This uses new capture analyysis to capture s={}", s); -LL | | -LL | | +... | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/issue-87378.stderr b/tests/ui/closures/2229_closure_analysis/issue-87378.stderr index 3273e92d9d171..862ae7445e8f1 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-87378.stderr +++ b/tests/ui/closures/2229_closure_analysis/issue-87378.stderr @@ -15,8 +15,7 @@ LL | / || { LL | | LL | | LL | | unsafe { u.value } -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -33,8 +32,7 @@ LL | / || { LL | | LL | | LL | | unsafe { u.value } -LL | | -LL | | +... | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/issue-88476.stderr b/tests/ui/closures/2229_closure_analysis/issue-88476.stderr index 69b83f21a95a5..225b0335cf535 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-88476.stderr +++ b/tests/ui/closures/2229_closure_analysis/issue-88476.stderr @@ -24,7 +24,6 @@ error: First Pass analysis includes: LL | let x = #[rustc_capture_analysis] move || { | _______________________________________^ ... | -LL | | LL | | }; | |_____^ | @@ -40,7 +39,6 @@ error: Min Capture analysis includes: LL | let x = #[rustc_capture_analysis] move || { | _______________________________________^ ... | -LL | | LL | | }; | |_____^ | @@ -56,7 +54,6 @@ error: First Pass analysis includes: LL | let c = #[rustc_capture_analysis] move || { | _______________________________________^ ... | -LL | | LL | | }; | |_____^ | @@ -72,7 +69,6 @@ error: Min Capture analysis includes: LL | let c = #[rustc_capture_analysis] move || { | _______________________________________^ ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.stderr b/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.stderr index 7125bfa31017b..e7e5e7f7fa1bf 100644 --- a/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.stderr +++ b/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.stderr @@ -6,7 +6,6 @@ LL | | LL | | LL | | match variant { ... | -LL | | } LL | | }; | |_____^ | @@ -24,7 +23,6 @@ LL | | LL | | LL | | match variant { ... | -LL | | } LL | | }; | |_____^ | @@ -64,7 +62,6 @@ LL | | LL | | LL | | match variant { ... | -LL | | } LL | | }; | |_____^ | @@ -87,7 +84,6 @@ LL | | LL | | LL | | match variant { ... | -LL | | } LL | | }; | |_____^ | @@ -138,7 +134,6 @@ LL | | LL | | LL | | match variant { ... | -LL | | } LL | | }; | |_____^ | @@ -156,7 +151,6 @@ LL | | LL | | LL | | match variant { ... | -LL | | } LL | | }; | |_____^ | @@ -174,7 +168,6 @@ LL | | LL | | LL | | match slice { ... | -LL | | } LL | | }; | |_____^ | @@ -192,7 +185,6 @@ LL | | LL | | LL | | match slice { ... | -LL | | } LL | | }; | |_____^ | @@ -210,7 +202,6 @@ LL | | LL | | LL | | match slice { ... | -LL | | } LL | | }; | |_____^ | @@ -228,7 +219,6 @@ LL | | LL | | LL | | match slice { ... | -LL | | } LL | | }; | |_____^ | @@ -246,7 +236,6 @@ LL | | LL | | LL | | match slice { ... | -LL | | } LL | | }; | |_____^ | @@ -264,7 +253,6 @@ LL | | LL | | LL | | match slice { ... | -LL | | } LL | | }; | |_____^ | @@ -281,8 +269,7 @@ LL | / || { LL | | LL | | match slice { LL | | [..] => {}, -LL | | _ => {} -LL | | } +... | LL | | }; | |_____^ diff --git a/tests/ui/closures/2229_closure_analysis/move_closure.stderr b/tests/ui/closures/2229_closure_analysis/move_closure.stderr index 68754b8f7bee4..a4919d488d1ef 100644 --- a/tests/ui/closures/2229_closure_analysis/move_closure.stderr +++ b/tests/ui/closures/2229_closure_analysis/move_closure.stderr @@ -139,8 +139,7 @@ LL | / move || { LL | | LL | | LL | | t.0.0 = "new S".into(); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -157,8 +156,7 @@ LL | / move || { LL | | LL | | LL | | t.0.0 = "new S".into(); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -175,8 +173,7 @@ LL | / move || { LL | | LL | | LL | | *ref_s += 10; -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -193,8 +190,7 @@ LL | / move || { LL | | LL | | LL | | *ref_s += 10; -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -211,8 +207,7 @@ LL | / move || { LL | | LL | | LL | | t.0.0 = "new s".into(); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -229,8 +224,7 @@ LL | / move || { LL | | LL | | LL | | t.0.0 = "new s".into(); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -247,8 +241,7 @@ LL | / move || { LL | | LL | | LL | | let _t = t.0.0; -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -265,8 +258,7 @@ LL | / move || { LL | | LL | | LL | | let _t = t.0.0; -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -283,8 +275,7 @@ LL | / move || { LL | | LL | | LL | | let _t = t.0.0; -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -301,8 +292,7 @@ LL | / move || { LL | | LL | | LL | | let _t = t.0.0; -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -319,8 +309,7 @@ LL | / move || { LL | | LL | | LL | | let _t = b.0; -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -337,8 +326,7 @@ LL | / move || { LL | | LL | | LL | | let _t = b.0; -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -355,8 +343,7 @@ LL | / move || { LL | | LL | | LL | | println!("{}", b.0); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -373,8 +360,7 @@ LL | / move || { LL | | LL | | LL | | println!("{}", b.0); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -391,8 +377,7 @@ LL | / move || { LL | | LL | | LL | | println!("{}", t.1.0); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -409,8 +394,7 @@ LL | / move || { LL | | LL | | LL | | println!("{}", t.1.0); -LL | | -LL | | +... | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr index 97f53e490e8dc..cbc7188a4ec4d 100644 --- a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr +++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr @@ -15,8 +15,7 @@ LL | / || { LL | | LL | | LL | | println!("{}", w.p.x); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -33,8 +32,7 @@ LL | / || { LL | | LL | | LL | | println!("{}", w.p.x); -LL | | -LL | | +... | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/nested-closure.stderr b/tests/ui/closures/2229_closure_analysis/nested-closure.stderr index 03550cb2d35c1..3b36069e62427 100644 --- a/tests/ui/closures/2229_closure_analysis/nested-closure.stderr +++ b/tests/ui/closures/2229_closure_analysis/nested-closure.stderr @@ -60,7 +60,6 @@ LL | | LL | | LL | | println!("{}", p.x); ... | -LL | | LL | | }; | |_____^ | @@ -88,7 +87,6 @@ LL | | LL | | LL | | println!("{}", p.x); ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr b/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr index e82295f047b26..c6608c0590013 100644 --- a/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr +++ b/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr @@ -15,8 +15,7 @@ LL | / || { LL | | LL | | LL | | println!("{}", pent.points[5].x); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -33,8 +32,7 @@ LL | / || { LL | | LL | | LL | | println!("{}", pent.points[5].x); -LL | | -LL | | +... | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr index 65a0a317ab6f3..ff3cd5b8f01a3 100644 --- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr +++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr @@ -36,7 +36,6 @@ LL | | LL | | LL | | println!("{:?}", a.0); ... | -LL | | LL | | }; | |_____^ | @@ -69,7 +68,6 @@ LL | | LL | | LL | | println!("{:?}", a.0); ... | -LL | | LL | | }; | |_____^ | @@ -102,7 +100,6 @@ LL | | LL | | LL | | println!("{:?}", a.1); ... | -LL | | LL | | }; | |_____^ | @@ -135,7 +132,6 @@ LL | | LL | | LL | | println!("{:?}", a.1); ... | -LL | | LL | | }; | |_____^ | @@ -168,7 +164,6 @@ LL | | LL | | LL | | println!("{:?}", b.1); ... | -LL | | LL | | }; | |_____^ | @@ -201,7 +196,6 @@ LL | | LL | | LL | | println!("{:?}", b.1); ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/repr_packed.stderr b/tests/ui/closures/2229_closure_analysis/repr_packed.stderr index d4b2f8bfeae99..bab1e8f9977fe 100644 --- a/tests/ui/closures/2229_closure_analysis/repr_packed.stderr +++ b/tests/ui/closures/2229_closure_analysis/repr_packed.stderr @@ -118,7 +118,6 @@ LL | | LL | | LL | | println!("{}", foo.x); ... | -LL | | LL | | }; | |_____^ | @@ -141,7 +140,6 @@ LL | | LL | | LL | | println!("{}", foo.x); ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr index a88bd01093a78..d4201b2d4c22b 100644 --- a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr +++ b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr @@ -16,7 +16,6 @@ LL | | LL | | LL | | p.x += 10; ... | -LL | | LL | | }; | |_____^ | @@ -39,7 +38,6 @@ LL | | LL | | LL | | p.x += 10; ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr index 54463c5277d5f..9f3c6576c7213 100644 --- a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr +++ b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr @@ -25,8 +25,7 @@ LL | / || unsafe { LL | | LL | | LL | | println!("{:?}", (*t.0).s); -LL | | -LL | | +... | LL | | }; | |_____^ | @@ -43,8 +42,7 @@ LL | / || unsafe { LL | | LL | | LL | | println!("{:?}", (*t.0).s); -LL | | -LL | | +... | LL | | }; | |_____^ | diff --git a/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr b/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr index 0b54b00ab3032..4cb0f4a4a9274 100644 --- a/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr +++ b/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr @@ -33,7 +33,6 @@ error: First Pass analysis includes: | LL | / || { ... | -LL | | LL | | }; | |_____^ | @@ -48,7 +47,6 @@ error: Min Capture analysis includes: | LL | / || { ... | -LL | | LL | | }; | |_____^ | @@ -63,7 +61,6 @@ error: First Pass analysis includes: | LL | / || { ... | -LL | | LL | | }; | |_____^ | @@ -78,7 +75,6 @@ error: Min Capture analysis includes: | LL | / || { ... | -LL | | LL | | }; | |_____^ | @@ -93,7 +89,6 @@ error: First Pass analysis includes: | LL | / || { ... | -LL | | LL | | }; | |_____^ | @@ -108,7 +103,6 @@ error: Min Capture analysis includes: | LL | / || { ... | -LL | | LL | | }; | |_____^ | diff --git a/tests/ui/codemap_tests/huge_multispan_highlight.ascii.svg b/tests/ui/codemap_tests/huge_multispan_highlight.ascii.svg index fe1eb753430d7..1cedbf75e4bf6 100644 --- a/tests/ui/codemap_tests/huge_multispan_highlight.ascii.svg +++ b/tests/ui/codemap_tests/huge_multispan_highlight.ascii.svg @@ -1,4 +1,4 @@ - +