1
Fork 0

Rollup merge of #134181 - estebank:trim-render, r=oli-obk

Tweak multispan rendering to reduce output length

Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments. We do that check not only on the first 4 lines of the multispan, but now also on the previous to last line as well.
This commit is contained in:
Matthias Krüger 2024-12-14 03:54:31 +01:00 committed by GitHub
commit 2846699366
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
181 changed files with 216 additions and 859 deletions

View file

@ -3048,11 +3048,19 @@ impl FileWithAnnotatedLines {
// working correctly. // working correctly.
let middle = min(ann.line_start + 4, ann.line_end); let middle = min(ann.line_start + 4, ann.line_end);
// We'll show up to 4 lines past the beginning of the multispan start. // We'll show up to 4 lines past the beginning of the multispan start.
// We will *not* include the tail of lines that are only whitespace. // We will *not* include the tail of lines that are only whitespace, a comment or
// a bare delimiter.
let filter = |s: &str| {
let s = s.trim();
// Consider comments as empty, but don't consider docstrings to be empty.
!(s.starts_with("//") && !(s.starts_with("///") || s.starts_with("//!")))
// Consider lines with nothing but whitespace, a single delimiter as empty.
&& !["", "{", "}", "(", ")", "[", "]"].contains(&s)
};
let until = (ann.line_start..middle) let until = (ann.line_start..middle)
.rev() .rev()
.filter_map(|line| file.get_line(line - 1).map(|s| (line + 1, s))) .filter_map(|line| file.get_line(line - 1).map(|s| (line + 1, s)))
.find(|(_, s)| !s.trim().is_empty()) .find(|(_, s)| filter(s))
.map(|(line, _)| line) .map(|(line, _)| line)
.unwrap_or(ann.line_start); .unwrap_or(ann.line_start);
for line in ann.line_start + 1..until { for line in ann.line_start + 1..until {
@ -3060,7 +3068,8 @@ impl FileWithAnnotatedLines {
add_annotation_to_file(&mut output, Lrc::clone(&file), line, ann.as_line()); add_annotation_to_file(&mut output, Lrc::clone(&file), line, ann.as_line());
} }
let line_end = ann.line_end - 1; 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| !filter(&s));
if middle < line_end && !end_is_empty {
add_annotation_to_file(&mut output, Lrc::clone(&file), line_end, ann.as_line()); add_annotation_to_file(&mut output, Lrc::clone(&file), line_end, ann.as_line());
} }
} else { } else {

View file

@ -20,7 +20,6 @@ LL | | fn clone_self(&self) -> Self {
LL | | Self { LL | | Self {
LL | | a: true, LL | | a: true,
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -32,7 +31,6 @@ LL | | fn default() -> Self {
LL | | Self { LL | | Self {
LL | | a: true, LL | | a: true,
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^

View file

@ -66,8 +66,7 @@ error: this block is too nested
LL | if true { LL | if true {
| _________________________^ | _________________________^
LL | | if true { LL | | if true {
LL | | ... |
LL | | }
LL | | } LL | | }
| |_________________^ | |_________________^
| |

View file

@ -286,7 +286,6 @@ LL | | if unsafe { true } {
LL | | todo!(); LL | | todo!();
LL | | } else { LL | | } else {
... | ... |
LL | | }
LL | | }; LL | | };
| |______^ | |______^
| |

View file

@ -294,7 +294,6 @@ LL | | if unsafe { true } {
LL | | todo!(); LL | | todo!();
LL | | } else { LL | | } else {
... | ... |
LL | | }
LL | | }; LL | | };
| |______^ | |______^
| |

View file

@ -80,7 +80,6 @@ error: an async construct yields a type which is itself awaitable
LL | let _m = async || { LL | let _m = async || {
| _______________________- | _______________________-
LL | | println!("I'm bored"); LL | | println!("I'm bored");
LL | | // Some more stuff
... | ... |
LL | | CustomFutureType LL | | CustomFutureType
| | ^^^^^^^^^^^^^^^^ | | ^^^^^^^^^^^^^^^^

View file

@ -44,7 +44,6 @@ LL | | if {
LL | | if s == "43" { LL | | if s == "43" {
LL | | return Some(43); LL | | return Some(43);
... | ... |
LL | | }
LL | | }); LL | | });
| |______^ | |______^
| |

View file

@ -115,8 +115,7 @@ error: all if blocks contain the same code at the end
--> tests/ui/branches_sharing_code/shared_at_bottom.rs:183:5 --> tests/ui/branches_sharing_code/shared_at_bottom.rs:183:5
| |
LL | / x << 2 LL | / x << 2
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -131,8 +130,7 @@ error: all if blocks contain the same code at the end
--> tests/ui/branches_sharing_code/shared_at_bottom.rs:192:5 --> tests/ui/branches_sharing_code/shared_at_bottom.rs:192:5
| |
LL | / x * 4 LL | / x * 4
LL | | ... |
LL | |
LL | | } LL | | }
| |_____^ | |_____^
| |

View file

@ -43,9 +43,7 @@ LL | } else {
| ____________^ | ____________^
LL | | if y == "world" { LL | | if y == "world" {
LL | | println!("world") LL | | println!("world")
LL | | }
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -66,9 +64,7 @@ LL | } else {
| ____________^ | ____________^
LL | | if let Some(42) = Some(42) { LL | | if let Some(42) = Some(42) {
LL | | println!("world") LL | | println!("world")
LL | | }
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -89,9 +85,7 @@ LL | } else {
| ____________^ | ____________^
LL | | if let Some(42) = Some(42) { LL | | if let Some(42) = Some(42) {
LL | | println!("world") LL | | println!("world")
LL | | }
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -112,9 +106,7 @@ LL | } else {
| ____________^ | ____________^
LL | | if x == "hello" { LL | | if x == "hello" {
LL | | println!("world") LL | | println!("world")
LL | | }
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -135,9 +127,7 @@ LL | } else {
| ____________^ | ____________^
LL | | if let Some(42) = Some(42) { LL | | if let Some(42) = Some(42) {
LL | | println!("world") LL | | println!("world")
LL | | }
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |

View file

@ -6,7 +6,6 @@ LL | |
LL | | LL | |
LL | | type Item = u8; LL | | type Item = u8;
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |

View file

@ -2,11 +2,7 @@ error: this loop never actually loops
--> tests/ui/crashes/ice-360.rs:5:5 --> tests/ui/crashes/ice-360.rs:5:5
| |
LL | / loop { LL | / loop {
LL | |
LL | |
LL | |
... | ... |
LL | |
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -16,11 +12,7 @@ error: this loop could be written as a `while let` loop
--> tests/ui/crashes/ice-360.rs:5:5 --> tests/ui/crashes/ice-360.rs:5:5
| |
LL | / loop { LL | / loop {
LL | |
LL | |
LL | |
... | ... |
LL | |
LL | | } LL | | }
| |_____^ help: try: `while let Some(ele) = iter.next() { .. }` | |_____^ help: try: `while let Some(ele) = iter.next() { .. }`
| |

View file

@ -2,8 +2,7 @@ error: this looks like you are trying to swap `a` and `b`
--> tests/ui/crate_level_checks/no_std_swap.rs:12:5 --> tests/ui/crate_level_checks/no_std_swap.rs:12:5
| |
LL | / a = b; LL | / a = b;
LL | | ... |
LL | |
LL | | b = a; LL | | b = a;
| |_________^ help: try: `core::mem::swap(&mut a, &mut b)` | |_________^ help: try: `core::mem::swap(&mut a, &mut b)`
| |

View file

@ -6,7 +6,6 @@ LL | | fn default() -> Self {
LL | | Self { LL | | Self {
LL | | a: false, LL | | a: false,
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |

View file

@ -99,8 +99,7 @@ LL | / /// for OldA
LL | | // struct OldA; LL | | // struct OldA;
LL | | LL | |
LL | | /// Docs LL | | /// Docs
LL | | /// for OldB ... |
LL | | // struct OldB;
LL | | LL | |
| |_^ | |_^
... ...

View file

@ -103,8 +103,7 @@ error: empty lines after outer attribute
--> tests/ui/empty_line_after/outer_attribute.rs:64:1 --> tests/ui/empty_line_after/outer_attribute.rs:64:1
| |
LL | / #[allow(unused)] LL | / #[allow(unused)]
LL | | ... |
LL | | // This comment is isolated
LL | | LL | |
| |_^ | |_^
LL | pub fn isolated_comment() {} LL | pub fn isolated_comment() {}

View file

@ -16,8 +16,7 @@ LL | / if !m.contains_key(&k) {
LL | | if true { LL | | if true {
LL | | m.insert(k, v); LL | | m.insert(k, v);
LL | | } else { LL | | } else {
LL | | m.insert(k, v2); ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -63,7 +62,6 @@ LL | | if true {
LL | | m.insert(k, v); LL | | m.insert(k, v);
LL | | } else { LL | | } else {
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -154,7 +152,6 @@ LL | | foo();
LL | | match 0 { LL | | match 0 {
LL | | 0 if false => { LL | | 0 if false => {
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |

View file

@ -13,7 +13,6 @@ error: all variants have the same prefix: `c`
LL | / enum Foo { LL | / enum Foo {
LL | | LL | |
LL | | cFoo, LL | | cFoo,
LL | |
... | ... |
LL | | cBaz, LL | | cBaz,
LL | | } LL | | }
@ -45,9 +44,7 @@ error: all variants have the same prefix: `Food`
LL | / enum Food { LL | / enum Food {
LL | | LL | |
LL | | FoodGood, LL | | FoodGood,
LL | |
... | ... |
LL | |
LL | | } LL | | }
| |_^ | |_^
| |

View file

@ -29,7 +29,6 @@ LL | |
LL | | fn from(i: usize) -> Invalid { LL | | fn from(i: usize) -> Invalid {
LL | | if i != 42 { LL | | if i != 42 {
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -49,7 +48,6 @@ LL | |
LL | | fn from(s: Option<String>) -> Invalid { LL | | fn from(s: Option<String>) -> Invalid {
LL | | let s = s.unwrap(); LL | | let s = s.unwrap();
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -76,7 +74,6 @@ LL | |
LL | | fn from(s: &'a mut <Box<u32> as ProjStrTrait>::ProjString) -> Invalid { LL | | fn from(s: &'a mut <Box<u32> as ProjStrTrait>::ProjString) -> Invalid {
LL | | if s.parse::<u32>().ok().unwrap() != 42 { LL | | if s.parse::<u32>().ok().unwrap() != 42 {
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |

View file

@ -7,7 +7,6 @@ LL | | for _ in &[42] {
LL | | let foo: &Option<_> = &Some::<u8>(42); LL | | let foo: &Option<_> = &Some::<u8>(42);
LL | | if foo.is_some() { LL | | if foo.is_some() {
... | ... |
LL | | }
LL | | } else { LL | | } else {
| |_____^ | |_____^
| |
@ -20,7 +19,6 @@ LL | | for _ in &[42] {
LL | | let bar: &Option<_> = &Some::<u8>(42); LL | | let bar: &Option<_> = &Some::<u8>(42);
LL | | if bar.is_some() { LL | | if bar.is_some() {
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
= note: `-D clippy::if-same-then-else` implied by `-D warnings` = note: `-D clippy::if-same-then-else` implied by `-D warnings`

View file

@ -20,7 +20,6 @@ error: infinite loop detected
LL | / loop { LL | / loop {
LL | | LL | |
LL | | loop { LL | | loop {
LL | |
... | ... |
LL | | do_something(); LL | | do_something();
LL | | } LL | | }
@ -37,9 +36,7 @@ error: infinite loop detected
LL | / loop { LL | / loop {
LL | | LL | |
LL | | loop { LL | | loop {
LL | | ... |
LL | | do_something();
LL | | }
LL | | } LL | | }
| |_________^ | |_________^
| |
@ -79,8 +76,7 @@ error: infinite loop detected
LL | / loop { LL | / loop {
LL | | fn inner_fn() -> ! { LL | | fn inner_fn() -> ! {
LL | | std::process::exit(0); LL | | std::process::exit(0);
LL | | } ... |
LL | | do_something();
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -97,7 +93,6 @@ LL | |
LL | | loop { LL | | loop {
LL | | if cond { LL | | if cond {
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -114,7 +109,6 @@ LL | |
LL | | 'inner: loop { LL | | 'inner: loop {
LL | | loop { LL | | loop {
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -145,7 +139,6 @@ LL | |
LL | | 'inner: loop { LL | | 'inner: loop {
LL | | loop { LL | | loop {
... | ... |
LL | | }
LL | | } LL | | }
| |_________^ | |_________^
| |
@ -162,7 +155,6 @@ LL | |
LL | | match opt { LL | | match opt {
LL | | Some(v) => { LL | | Some(v) => {
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -279,7 +271,6 @@ LL | |
LL | | 'inner: loop { LL | | 'inner: loop {
LL | | loop { LL | | loop {
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |

View file

@ -6,7 +6,6 @@ LL | |
LL | | type IntoIter = std::slice::Iter<'a, u8>; LL | | type IntoIter = std::slice::Iter<'a, u8>;
LL | | type Item = &'a u8; LL | | type Item = &'a u8;
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -30,7 +29,6 @@ LL | |
LL | | type IntoIter = std::slice::IterMut<'a, u8>; LL | | type IntoIter = std::slice::IterMut<'a, u8>;
LL | | type Item = &'a mut u8; LL | | type Item = &'a mut u8;
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -52,7 +50,6 @@ LL | |
LL | | type IntoIter = std::slice::Iter<'a, T>; LL | | type IntoIter = std::slice::Iter<'a, T>;
LL | | type Item = &'a T; LL | | type Item = &'a T;
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -74,7 +71,6 @@ LL | |
LL | | type IntoIter = std::slice::IterMut<'a, T>; LL | | type IntoIter = std::slice::IterMut<'a, T>;
LL | | type Item = &'a mut T; LL | | type Item = &'a mut T;
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -96,7 +92,6 @@ LL | |
LL | | type IntoIter = std::slice::IterMut<'a, T>; LL | | type IntoIter = std::slice::IterMut<'a, T>;
LL | | type Item = &'a mut T; LL | | type Item = &'a mut T;
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -117,8 +112,7 @@ LL | / impl<'a> IntoIterator for &'a Issue12037 {
LL | | type IntoIter = std::slice::Iter<'a, u8>; LL | | type IntoIter = std::slice::Iter<'a, u8>;
LL | | type Item = &'a u8; LL | | type Item = &'a u8;
LL | | fn into_iter(self) -> Self::IntoIter { LL | | fn into_iter(self) -> Self::IntoIter {
LL | | todo!() ... |
LL | | }
LL | | } LL | | }
| |_________^ | |_________^
... ...

View file

@ -6,7 +6,6 @@ LL | |
LL | | LL | |
LL | | if s == String::new() { LL | | if s == String::new() {
... | ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `strings.into_iter().find(|s| s == String::new())` | |________^ help: replace with an iterator: `strings.into_iter().find(|s| s == String::new())`
| |
@ -22,7 +21,6 @@ LL | |
LL | | LL | |
LL | | if s == String::new() { LL | | if s == String::new() {
... | ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `arr.into_iter().map(|(s, _)| s).find(|s| s == String::new())` | |________^ help: replace with an iterator: `arr.into_iter().map(|(s, _)| s).find(|s| s == String::new())`
| |

View file

@ -4,8 +4,7 @@ error: manual implementation of `Iterator::find`
LL | / for &v in ARRAY { LL | / for &v in ARRAY {
LL | | if v == n { LL | | if v == n {
LL | | return Some(v); LL | | return Some(v);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `ARRAY.iter().find(|&&v| v == n).copied()` | |________^ help: replace with an iterator: `ARRAY.iter().find(|&&v| v == n).copied()`
| |
@ -18,8 +17,7 @@ error: manual implementation of `Iterator::find`
LL | / for (a, _) in arr { LL | / for (a, _) in arr {
LL | | if a % 2 == 0 { LL | | if a % 2 == 0 {
LL | | return Some(a); LL | | return Some(a);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `arr.into_iter().map(|(a, _)| a).find(|&a| a % 2 == 0)` | |________^ help: replace with an iterator: `arr.into_iter().map(|(a, _)| a).find(|&a| a % 2 == 0)`
@ -29,8 +27,7 @@ error: manual implementation of `Iterator::find`
LL | / for el in arr { LL | / for el in arr {
LL | | if el.name.len() == 10 { LL | | if el.name.len() == 10 {
LL | | return Some(el); LL | | return Some(el);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `arr.into_iter().find(|el| el.name.len() == 10)` | |________^ help: replace with an iterator: `arr.into_iter().find(|el| el.name.len() == 10)`
| |
@ -42,8 +39,7 @@ error: manual implementation of `Iterator::find`
LL | / for Tuple(a, _) in arr { LL | / for Tuple(a, _) in arr {
LL | | if a >= 3 { LL | | if a >= 3 {
LL | | return Some(a); LL | | return Some(a);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `arr.into_iter().map(|Tuple(a, _)| a).find(|&a| a >= 3)` | |________^ help: replace with an iterator: `arr.into_iter().map(|Tuple(a, _)| a).find(|&a| a >= 3)`
@ -53,8 +49,7 @@ error: manual implementation of `Iterator::find`
LL | / for el in arr { LL | / for el in arr {
LL | | if el.should_keep() { LL | | if el.should_keep() {
LL | | return Some(el); LL | | return Some(el);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `arr.into_iter().find(|el| el.should_keep())` | |________^ help: replace with an iterator: `arr.into_iter().find(|el| el.should_keep())`
| |
@ -66,8 +61,7 @@ error: manual implementation of `Iterator::find`
LL | / for el in arr { LL | / for el in arr {
LL | | if f(el) == 20 { LL | | if f(el) == 20 {
LL | | return Some(el); LL | | return Some(el);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `arr.into_iter().find(|&el| f(el) == 20)` | |________^ help: replace with an iterator: `arr.into_iter().find(|&el| f(el) == 20)`
@ -77,8 +71,7 @@ error: manual implementation of `Iterator::find`
LL | / for &el in arr.values() { LL | / for &el in arr.values() {
LL | | if f(el) { LL | | if f(el) {
LL | | return Some(el); LL | | return Some(el);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `arr.values().find(|&&el| f(el)).copied()` | |________^ help: replace with an iterator: `arr.values().find(|&&el| f(el)).copied()`
@ -88,8 +81,7 @@ error: manual implementation of `Iterator::find`
LL | / for el in arr { LL | / for el in arr {
LL | | if el.is_true { LL | | if el.is_true {
LL | | return Some(el); LL | | return Some(el);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `arr.into_iter().find(|el| el.is_true)` | |________^ help: replace with an iterator: `arr.into_iter().find(|el| el.is_true)`
| |
@ -101,8 +93,7 @@ error: manual implementation of `Iterator::find`
LL | / for (_, &x) in v { LL | / for (_, &x) in v {
LL | | if x > 10 { LL | | if x > 10 {
LL | | return Some(x); LL | | return Some(x);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `v.into_iter().map(|(_, &x)| x).find(|&x| x > 10)` | |________^ help: replace with an iterator: `v.into_iter().map(|(_, &x)| x).find(|&x| x > 10)`
@ -112,8 +103,7 @@ error: manual implementation of `Iterator::find`
LL | / for &(_, &x) in v { LL | / for &(_, &x) in v {
LL | | if x > 10 { LL | | if x > 10 {
LL | | return Some(x); LL | | return Some(x);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |________^ help: replace with an iterator: `v.iter().map(|&(_, &x)| x).find(|&x| x > 10)` | |________^ help: replace with an iterator: `v.iter().map(|&(_, &x)| x).find(|&x| x > 10)`
@ -123,8 +113,7 @@ error: manual implementation of `Iterator::find`
LL | / for x in arr { LL | / for x in arr {
LL | | if x >= 5 { LL | | if x >= 5 {
LL | | return Some(x); LL | | return Some(x);
LL | | } ... |
LL | | }
LL | | return None; LL | | return None;
| |________________^ help: replace with an iterator: `arr.into_iter().find(|&x| x >= 5)` | |________________^ help: replace with an iterator: `arr.into_iter().find(|&x| x >= 5)`
@ -134,8 +123,7 @@ error: manual implementation of `Iterator::find`
LL | / for x in arr { LL | / for x in arr {
LL | | if x < 1 { LL | | if x < 1 {
LL | | return Some(x); LL | | return Some(x);
LL | | } ... |
LL | | }
LL | | None LL | | None
| |____________^ help: replace with an iterator: `arr.into_iter().find(|&x| x < 1)` | |____________^ help: replace with an iterator: `arr.into_iter().find(|&x| x < 1)`

View file

@ -184,7 +184,6 @@ LL | |
LL | | Some(1), LL | | Some(1),
LL | | Some(2), LL | | Some(2),
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |

View file

@ -148,7 +148,6 @@ LL | |
LL | | v_some LL | | v_some
LL | | } else { LL | | } else {
... | ... |
LL | | }
LL | | }; LL | | };
| |______^ | |______^
| |
@ -175,7 +174,6 @@ LL | |
LL | | v_some LL | | v_some
LL | | } else { LL | | } else {
... | ... |
LL | | }
LL | | }; LL | | };
| |______^ | |______^
| |
@ -197,7 +195,6 @@ LL | |
LL | | v_some LL | | v_some
LL | | } else { LL | | } else {
... | ... |
LL | | }
LL | | }; LL | | };
| |______^ | |______^
| |
@ -306,7 +303,6 @@ LL | |
LL | | v_some LL | | v_some
LL | | } else { LL | | } else {
... | ... |
LL | | }
LL | | }; LL | | };
| |______^ | |______^
| |

View file

@ -36,7 +36,6 @@ LL | | Some(i) => i,
LL | | None => { LL | | None => {
LL | | 42 + 42 LL | | 42 + 42
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -130,7 +129,6 @@ LL | | Ok(i) => i,
LL | | Err(_) => { LL | | Err(_) => {
LL | | 42 + 42 LL | | 42 + 42
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -77,9 +77,6 @@ error: called `map(..).flatten()` on `Option`
| |
LL | .map(|_| { LL | .map(|_| {
| __________^ | __________^
LL | | // we need some newlines
LL | | // so that the span is big enough
LL | | // for a split output of the diagnostic
... | ... |
LL | | }) LL | | })
LL | | .flatten(); LL | | .flatten();

View file

@ -75,9 +75,6 @@ error: you seem to be trying to match on a boolean expression
--> tests/ui/match_bool.rs:36:5 --> tests/ui/match_bool.rs:36:5
| |
LL | / match test && test { LL | / match test && test {
LL | |
LL | |
LL | |
... | ... |
LL | | _ => (), LL | | _ => (),
LL | | }; LL | | };

View file

@ -68,8 +68,7 @@ LL | let _ans = match x {
| ____________________^ | ____________________^
LL | | E::A(_) => { LL | | E::A(_) => {
LL | | true LL | | true
LL | | } ... |
LL | | E::B(_) => true,
LL | | _ => false, LL | | _ => false,
LL | | }; LL | | };
| |_________^ help: try: `matches!(x, E::A(_) | E::B(_))` | |_________^ help: try: `matches!(x, E::A(_) | E::B(_))`

View file

@ -72,7 +72,6 @@ LL | | /// dox
LL | | pub fn documented() {} LL | | pub fn documented() {}
LL | | pub fn undocumented1() {} LL | | pub fn undocumented1() {}
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^

View file

@ -2,9 +2,7 @@ error: missing documentation for the crate
--> tests/ui/missing_doc_crate_missing.rs:1:1 --> tests/ui/missing_doc_crate_missing.rs:1:1
| |
LL | / #![warn(clippy::missing_docs_in_private_items)] LL | / #![warn(clippy::missing_docs_in_private_items)]
LL | | ... |
LL | |
LL | |
LL | | fn main() {} LL | | fn main() {}
| |____________^ | |____________^
| |

View file

@ -6,7 +6,6 @@ LL | |
LL | | // unused field: hidden LL | | // unused field: hidden
LL | | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { LL | | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -28,7 +27,6 @@ LL | |
LL | | // unused fields: hidden, hidden2, hidden4 LL | | // unused fields: hidden, hidden2, hidden4
LL | | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { LL | | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -58,7 +56,6 @@ LL | |
LL | | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { LL | | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
LL | | let mut f = formatter.debug_struct("MultiExprDebugImpl"); LL | | let mut f = formatter.debug_struct("MultiExprDebugImpl");
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |

View file

@ -6,7 +6,6 @@ LL | |
LL | | LL | |
LL | | if *v == 10 { LL | | if *v == 10 {
... | ... |
LL | | }
LL | | }); LL | | });
| |_______^ | |_______^
| |

View file

@ -34,7 +34,6 @@ error: this `if` branch is empty
LL | / if { LL | / if {
LL | | if let true = true LL | | if let true = true
LL | | && true LL | | && true
LL | | {
... | ... |
LL | | } && true LL | | } && true
LL | | {} LL | | {}

View file

@ -2,9 +2,6 @@ error: this loop never actually loops
--> tests/ui/never_loop.rs:12:5 --> tests/ui/never_loop.rs:12:5
| |
LL | / loop { LL | / loop {
LL | |
LL | |
LL | | // clippy::never_loop
... | ... |
LL | | break; LL | | break;
LL | | } LL | | }
@ -75,7 +72,6 @@ LL | |
LL | | // never loops LL | | // never loops
LL | | match x { LL | | match x {
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -126,7 +122,6 @@ LL | |
LL | | 'b: { LL | | 'b: {
LL | | break 'b 'c: { LL | | break 'b 'c: {
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^

View file

@ -115,8 +115,7 @@ LL | let _ = if let Some(x) = arg {
| _____________^ | _____________^
LL | | x LL | | x
LL | | } else { LL | | } else {
LL | | // map_or_else must be suggested ... |
LL | | side_effect()
LL | | }; LL | | };
| |_____^ help: try: `arg.map_or_else(side_effect, |x| x)` | |_____^ help: try: `arg.map_or_else(side_effect, |x| x)`

View file

@ -183,8 +183,7 @@ error: this block may be rewritten with the `?` operator
| |
LL | / if a.is_none() { LL | / if a.is_none() {
LL | | return None; LL | | return None;
LL | | // do lint here, the outer `try` is not relevant here ... |
LL | | // https://github.com/rust-lang/rust-clippy/pull/11001#issuecomment-1610636867
LL | | } LL | | }
| |_____________^ help: replace it with: `a?;` | |_____________^ help: replace it with: `a?;`

View file

@ -5,8 +5,7 @@ LL | pub fn complex_return_triggers_the_lint() -> i32 {
| __________________________________________________- | __________________________________________________-
LL | | fn foo() -> i32 { LL | | fn foo() -> i32 {
LL | | 1 LL | | 1
LL | | } ... |
LL | | let mutex = Mutex::new(1);
LL | | let lock = mutex.lock().unwrap(); LL | | let lock = mutex.lock().unwrap();
| | ^^^^ | | ^^^^
... | ... |

View file

@ -22,10 +22,7 @@ error: you seem to be trying to use `match` for destructuring a single pattern.
--> tests/ui/single_match.rs:23:5 --> tests/ui/single_match.rs:23:5
| |
LL | / match x { LL | / match x {
LL | | // Note the missing block braces. ... |
LL | | // We suggest `if let Some(y) = x { .. }` because the macro
LL | | // is expanded before we can do anything.
LL | | Some(y) => println!("{:?}", y),
LL | | _ => (), LL | | _ => (),
LL | | } LL | | }
| |_____^ help: try: `if let Some(y) = x { println!("{:?}", y) }` | |_____^ help: try: `if let Some(y) = x { println!("{:?}", y) }`

View file

@ -68,8 +68,7 @@ LL | / match Result::<i32, &Infallible>::Ok(1) {
LL | | Ok(a) => println!("${:?}", a), LL | | Ok(a) => println!("${:?}", a),
LL | | Err(_) => { LL | | Err(_) => {
LL | | println!("else block"); LL | | println!("else block");
LL | | return; ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |
@ -88,8 +87,7 @@ LL | / match Cow::from("moo") {
LL | | Cow::Owned(a) => println!("${:?}", a), LL | | Cow::Owned(a) => println!("${:?}", a),
LL | | Cow::Borrowed(_) => { LL | | Cow::Borrowed(_) => {
LL | | println!("else block"); LL | | println!("else block");
LL | | return; ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |

View file

@ -13,8 +13,7 @@ error: assignment to temporary
LL | / MultiStruct { LL | / MultiStruct {
LL | | LL | |
LL | | structure: Struct { field: 0 }, LL | | structure: Struct { field: 0 },
LL | | } ... |
LL | | .structure
LL | | .field = 1; LL | | .field = 1;
| |______________^ | |______________^

View file

@ -34,7 +34,6 @@ LL | |
LL | | { LL | | {
LL | | true; LL | | true;
... | ... |
LL | | }
LL | | ); LL | | );
| |_____^ | |_____^
@ -46,7 +45,6 @@ LL | |
LL | | { LL | | {
LL | | true; LL | | true;
... | ... |
LL | | }
LL | | ); LL | | );
| |_____^ | |_____^
@ -58,7 +56,6 @@ LL | |
LL | | { LL | | {
LL | | true; LL | | true;
... | ... |
LL | | }
LL | | ); LL | | );
| |_____^ | |_____^
@ -70,7 +67,6 @@ LL | |
LL | | { LL | | {
LL | | true; LL | | true;
... | ... |
LL | | }
LL | | ); LL | | );
| |_____^ | |_____^

View file

@ -434,11 +434,7 @@ error: unnecessary closure used to substitute value for `Result::Err`
| |
LL | let _: Result<usize, usize> = res. LL | let _: Result<usize, usize> = res.
| ___________________________________^ | ___________________________________^
LL | | // some lines
LL | | // some lines
LL | | // some lines
... | ... |
LL | | // some lines
LL | | or_else(|_| Ok(ext_str.some_field)); LL | | or_else(|_| Ok(ext_str.some_field));
| |_______________________________________^ | |_______________________________________^
| |

View file

@ -6,7 +6,6 @@ LL | |
LL | | LL | |
LL | | if a && b { LL | | if a && b {
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -112,7 +111,6 @@ LL | |
LL | | if a && b { LL | | if a && b {
LL | | return Some(()); LL | | return Some(());
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |
@ -139,7 +137,6 @@ LL | |
LL | | if a && b { LL | | if a && b {
LL | | return Ok(()); LL | | return Ok(());
... | ... |
LL | | }
LL | | } LL | | }
| |_^ | |_^
| |

View file

@ -6,7 +6,6 @@ LL | |
LL | | // checks whether a string represents a number divisible by 3 LL | | // checks whether a string represents a number divisible by 3
LL | | let i = i_str.parse::<i32>().unwrap(); LL | | let i = i_str.parse::<i32>().unwrap();
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
| |

View file

@ -2,8 +2,7 @@ error: calls to `push` immediately after creation
--> tests/ui/vec_init_then_push.rs:5:5 --> tests/ui/vec_init_then_push.rs:5:5
| |
LL | / let mut def_err: Vec<u32> = Default::default(); LL | / let mut def_err: Vec<u32> = Default::default();
LL | | ... |
LL | |
LL | | def_err.push(0); LL | | def_err.push(0);
| |____________________^ help: consider using the `vec![]` macro: `let def_err: Vec<u32> = vec![..];` | |____________________^ help: consider using the `vec![]` macro: `let def_err: Vec<u32> = vec![..];`
| |

View file

@ -6,7 +6,6 @@ LL | |
LL | | LL | |
LL | | if let Some(_x) = y { LL | | if let Some(_x) = y {
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ help: try: `while let Some(_x) = y { .. }` | |_____^ help: try: `while let Some(_x) = y { .. }`
| |
@ -45,7 +44,6 @@ LL | |
LL | | let x = match y { LL | | let x = match y {
LL | | Some(x) => x, LL | | Some(x) => x,
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ help: try: `while let Some(x) = y { .. }` | |_____^ help: try: `while let Some(x) = y { .. }`

View file

@ -24,8 +24,7 @@ note: inside `main`
LL | / thread::spawn(|| { LL | / thread::spawn(|| {
LL | | unsafe { LL | | unsafe {
LL | | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); LL | | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0);
LL | | } ... |
LL | | })
LL | | .join() LL | | .join()
| |___________^ | |___________^

View file

@ -14,7 +14,6 @@ LL | | let _unit: ();
LL | | { LL | | {
LL | | let non_copy = S(42); LL | | let non_copy = S(42);
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
help: <TAG> is this argument help: <TAG> is this argument

View file

@ -16,7 +16,6 @@ LL | | let _unit: ();
LL | | { LL | | {
LL | | let non_copy = S(42); LL | | let non_copy = S(42);
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
help: the protected tag <TAG> was created here, in the initial state Reserved help: the protected tag <TAG> was created here, in the initial state Reserved

View file

@ -14,7 +14,6 @@ LL | | let _unit: ();
LL | | { LL | | {
LL | | let non_copy = S(42); LL | | let non_copy = S(42);
... | ... |
LL | |
LL | | } LL | | }
| |_____^ | |_____^
help: <TAG> is this argument help: <TAG> is this argument

View file

@ -16,7 +16,6 @@ LL | | let _unit: ();
LL | | { LL | | {
LL | | let non_copy = S(42); LL | | let non_copy = S(42);
... | ... |
LL | |
LL | | } LL | | }
| |_____^ | |_____^
help: the protected tag <TAG> was created here, in the initial state Reserved help: the protected tag <TAG> was created here, in the initial state Reserved

View file

@ -14,7 +14,6 @@ LL | | {
LL | | let x = 0; LL | | let x = 0;
LL | | let ptr = &raw mut x; LL | | let ptr = &raw mut x;
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
help: <TAG> is this argument help: <TAG> is this argument

View file

@ -16,7 +16,6 @@ LL | | {
LL | | let x = 0; LL | | let x = 0;
LL | | let ptr = &raw mut x; LL | | let ptr = &raw mut x;
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
help: the protected tag <TAG> was created here, in the initial state Reserved help: the protected tag <TAG> was created here, in the initial state Reserved

View file

@ -14,7 +14,6 @@ LL | | {
LL | | let _x = 0; LL | | let _x = 0;
LL | | let ptr = &raw mut _x; LL | | let ptr = &raw mut _x;
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
help: <TAG> is this argument help: <TAG> is this argument

View file

@ -16,7 +16,6 @@ LL | | {
LL | | let _x = 0; LL | | let _x = 0;
LL | | let ptr = &raw mut _x; LL | | let ptr = &raw mut _x;
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
help: the protected tag <TAG> was created here, in the initial state Reserved help: the protected tag <TAG> was created here, in the initial state Reserved

View file

@ -14,7 +14,6 @@ LL | | {
LL | | let _x = 0; LL | | let _x = 0;
LL | | let ptr = &raw mut _x; LL | | let ptr = &raw mut _x;
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
help: <TAG> is this argument help: <TAG> is this argument

View file

@ -16,7 +16,6 @@ LL | | {
LL | | let _x = 0; LL | | let _x = 0;
LL | | let ptr = &raw mut _x; LL | | let ptr = &raw mut _x;
... | ... |
LL | | }
LL | | } LL | | }
| |_____^ | |_____^
help: the protected tag <TAG> was created here, in the initial state Reserved help: the protected tag <TAG> was created here, in the initial state Reserved

View file

@ -4,7 +4,6 @@ error: unclosed quote string `"`
LL | / /// ```{class="} LL | / /// ```{class="}
LL | | /// main; LL | | /// main;
LL | | /// ``` LL | | /// ```
LL | |
... | ... |
LL | | /// main; LL | | /// main;
LL | | /// ``` LL | | /// ```
@ -23,7 +22,6 @@ error: unclosed quote string `"`
LL | / /// ```{class="} LL | / /// ```{class="}
LL | | /// main; LL | | /// main;
LL | | /// ``` LL | | /// ```
LL | |
... | ... |
LL | | /// main; LL | | /// main;
LL | | /// ``` LL | | /// ```

View file

@ -308,19 +308,12 @@ LL | pub trait SVec: Index<
| | | | | |
| | this trait cannot be made into an object... | | this trait cannot be made into an object...
LL | | <Self as SVec>::Item, LL | | <Self as SVec>::Item,
LL | |
LL | |
... | ... |
LL | |/ Output = <Index<<Self as SVec>::Item, LL | |/ Output = <Index<<Self as SVec>::Item,
LL | ||
LL | ||
LL | ||
... || ... ||
LL | ||
LL | || Output = <Self as SVec>::Item> as SVec>::Item, LL | || Output = <Self as SVec>::Item> as SVec>::Item,
| ||_________________________________________________^ ...because it uses `Self` as a type parameter | ||_________________________________________________^ ...because it uses `Self` as a type parameter
... | ... |
LL | |
LL | | > { LL | | > {
| |__^ ...because it uses `Self` as a type parameter | |__^ ...because it uses `Self` as a type parameter
help: consider using an opaque type instead help: consider using an opaque type instead

View file

@ -2,9 +2,6 @@ error: unknown attribute `compile-fail`
--> $DIR/check-attr.rs:3:1 --> $DIR/check-attr.rs:3:1
| |
LL | / /// foo LL | / /// foo
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -22,9 +19,6 @@ error: unknown attribute `compilefail`
--> $DIR/check-attr.rs:3:1 --> $DIR/check-attr.rs:3:1
| |
LL | / /// foo LL | / /// foo
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -37,9 +31,6 @@ error: unknown attribute `comPile_fail`
--> $DIR/check-attr.rs:3:1 --> $DIR/check-attr.rs:3:1
| |
LL | / /// foo LL | / /// foo
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -52,9 +43,6 @@ error: unknown attribute `should-panic`
--> $DIR/check-attr.rs:13:1 --> $DIR/check-attr.rs:13:1
| |
LL | / /// bar LL | / /// bar
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -67,9 +55,6 @@ error: unknown attribute `shouldpanic`
--> $DIR/check-attr.rs:13:1 --> $DIR/check-attr.rs:13:1
| |
LL | / /// bar LL | / /// bar
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -82,9 +67,6 @@ error: unknown attribute `sHould_panic`
--> $DIR/check-attr.rs:13:1 --> $DIR/check-attr.rs:13:1
| |
LL | / /// bar LL | / /// bar
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -97,9 +79,6 @@ error: unknown attribute `no-run`
--> $DIR/check-attr.rs:23:1 --> $DIR/check-attr.rs:23:1
| |
LL | / /// foobar LL | / /// foobar
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -112,9 +91,6 @@ error: unknown attribute `norun`
--> $DIR/check-attr.rs:23:1 --> $DIR/check-attr.rs:23:1
| |
LL | / /// foobar LL | / /// foobar
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -127,9 +103,6 @@ error: unknown attribute `no_Run`
--> $DIR/check-attr.rs:23:1 --> $DIR/check-attr.rs:23:1
| |
LL | / /// foobar LL | / /// foobar
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -142,9 +115,6 @@ error: unknown attribute `test-harness`
--> $DIR/check-attr.rs:33:1 --> $DIR/check-attr.rs:33:1
| |
LL | / /// b LL | / /// b
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -157,9 +127,6 @@ error: unknown attribute `testharness`
--> $DIR/check-attr.rs:33:1 --> $DIR/check-attr.rs:33:1
| |
LL | / /// b LL | / /// b
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```
@ -172,9 +139,6 @@ error: unknown attribute `teSt_harness`
--> $DIR/check-attr.rs:33:1 --> $DIR/check-attr.rs:33:1
| |
LL | / /// b LL | / /// b
LL | |
LL | |
LL | |
... | ... |
LL | | /// boo LL | | /// boo
LL | | /// ``` LL | | /// ```

View file

@ -6,7 +6,6 @@ LL | |
LL | | LL | |
LL | | #![warn(missing_docs)] LL | | #![warn(missing_docs)]
... | ... |
LL | |
LL | | pub fn foo() {} LL | | pub fn foo() {}
| |_______________^ | |_______________^
| |

View file

@ -271,9 +271,6 @@ error: unescaped backtick
--> $DIR/unescaped_backticks.rs:323:5 --> $DIR/unescaped_backticks.rs:323:5
| |
LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`], LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
LL | |
LL | |
LL | |
... | ... |
LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
LL | | /// level changes. LL | | /// level changes.
@ -290,9 +287,6 @@ error: unescaped backtick
--> $DIR/unescaped_backticks.rs:323:5 --> $DIR/unescaped_backticks.rs:323:5
| |
LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`], LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
LL | |
LL | |
LL | |
... | ... |
LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
LL | | /// level changes. LL | | /// level changes.
@ -307,9 +301,6 @@ error: unescaped backtick
--> $DIR/unescaped_backticks.rs:323:5 --> $DIR/unescaped_backticks.rs:323:5
| |
LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`], LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
LL | |
LL | |
LL | |
... | ... |
LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
LL | | /// level changes. LL | | /// level changes.
@ -326,9 +317,6 @@ error: unescaped backtick
--> $DIR/unescaped_backticks.rs:323:5 --> $DIR/unescaped_backticks.rs:323:5
| |
LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`], LL | / /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
LL | |
LL | |
LL | |
... | ... |
LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max LL | | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
LL | | /// level changes. LL | | /// level changes.

View file

@ -7,8 +7,7 @@ LL | // fn oom(
LL | || info: &Layout, LL | || info: &Layout,
LL | || ) -> () LL | || ) -> ()
| ||_______- arguments to this function are incorrect | ||_______- arguments to this function are incorrect
LL | | { ... |
LL | | loop {}
LL | | } LL | | }
| |__^ expected `&Layout`, found `Layout` | |__^ expected `&Layout`, found `Layout`
| |
@ -30,8 +29,7 @@ LL | // fn oom(
LL | || info: &Layout, LL | || info: &Layout,
LL | || ) -> () LL | || ) -> ()
| ||_______^ expected `!`, found `()` | ||_______^ expected `!`, found `()`
LL | | { ... |
LL | | loop {}
LL | | } LL | | }
| |__- expected `!` because of return type | |__- expected `!` because of return type
| |

View file

@ -3,8 +3,7 @@ error[E0658]: associated const equality is incomplete
| |
LL | impl Tr3<N LL | impl Tr3<N
| __________^ | __________^
LL | | ... |
LL | |
LL | | = 42, T2 = Qux, T3 = usize> for Bar { LL | | = 42, T2 = Qux, T3 = usize> for Bar {
| |____^ | |____^
| |
@ -198,8 +197,7 @@ error[E0229]: associated item constraints are not allowed here
| |
LL | impl Tr3<N LL | impl Tr3<N
| __________^ | __________^
LL | | ... |
LL | |
LL | | = 42, T2 = Qux, T3 = usize> for Bar { LL | | = 42, T2 = Qux, T3 = usize> for Bar {
| |____^ associated item constraint not allowed here | |____^ associated item constraint not allowed here
| |

View file

@ -2,8 +2,7 @@ error[E0277]: the trait bound `Bug: Foo` is not satisfied
--> $DIR/issue-59324.rs:11:1 --> $DIR/issue-59324.rs:11:1
| |
LL | / pub trait ThriftService<Bug: NotFoo>: LL | / pub trait ThriftService<Bug: NotFoo>:
LL | | ... |
LL | |
LL | | Service<AssocType = <Bug as Foo>::OnlyFoo> LL | | Service<AssocType = <Bug as Foo>::OnlyFoo>
| |______________________________________________^ the trait `Foo` is not implemented for `Bug` | |______________________________________________^ the trait `Foo` is not implemented for `Bug`
| |
@ -20,7 +19,6 @@ LL | |
LL | | LL | |
LL | | Service<AssocType = <Bug as Foo>::OnlyFoo> LL | | Service<AssocType = <Bug as Foo>::OnlyFoo>
... | ... |
LL | |
LL | | } LL | | }
| |_^ the trait `Foo` is not implemented for `Bug` | |_^ the trait `Foo` is not implemented for `Bug`
| |

View file

@ -23,7 +23,6 @@ LL | |
LL | | let block = async { LL | | let block = async {
LL | | return 0u8; LL | | return 0u8;
... | ... |
LL | |
LL | | } LL | | }
| |_^ expected `u8`, found `()` | |_^ expected `u8`, found `()`

View file

@ -31,7 +31,6 @@ LL | |
LL | | if true { LL | | if true {
LL | | false LL | | false
... | ... |
LL | |
LL | | }) LL | | })
| |_____^ expected `bool`, found `Option<()>` | |_____^ expected `bool`, found `Option<()>`
| |

View file

@ -14,8 +14,7 @@ LL | async fn foo() {
LL | | // Adding an .await here avoids the ICE LL | | // Adding an .await here avoids the ICE
LL | | test()?; LL | | test()?;
| | ^ cannot use the `?` operator in an async function that returns `()` | | ^ cannot use the `?` operator in an async function that returns `()`
LL | | ... |
LL | |
LL | | } LL | | }
| |_- this function should return `Result` or `Option` to accept `?` | |_- this function should return `Result` or `Option` to accept `?`
| |

View file

@ -8,10 +8,7 @@ LL | pub async fn start(&self) {
| let's call the lifetime of this reference `'1` | let's call the lifetime of this reference `'1`
... ...
LL | / require_static(async move { LL | / require_static(async move {
LL | | ... |
LL | |
LL | |
LL | | &self;
LL | | }); LL | | });
| | ^ | | ^
| | | | | |

View file

@ -66,8 +66,7 @@ LL | fn foo3() {
LL | / async { LL | / async {
LL | | LL | |
LL | | let _ = #[track_caller] || { LL | | let _ = #[track_caller] || {
LL | | ... |
LL | | };
LL | | } LL | | }
| |_____^ expected `()`, found `async` block | |_____^ expected `()`, found `async` block
| |

View file

@ -66,8 +66,7 @@ LL | fn foo3() {
LL | / async { LL | / async {
LL | | LL | |
LL | | let _ = #[track_caller] || { LL | | let _ = #[track_caller] || {
LL | | ... |
LL | | };
LL | | } LL | | }
| |_____^ expected `()`, found `async` block | |_____^ expected `()`, found `async` block
| |

View file

@ -45,7 +45,6 @@ LL | | let _ = #[collapse_debuginfo(yes)] || { };
LL | | LL | |
LL | | #[collapse_debuginfo(yes)] LL | | #[collapse_debuginfo(yes)]
... | ... |
LL | | }
LL | | } LL | | }
| |_- not a macro definition | |_- not a macro definition

View file

@ -22,7 +22,6 @@ LL | |
LL | | fn bar() { LL | | fn bar() {
LL | | fn foo() { LL | | fn foo() {
... | ... |
LL | |
LL | | fn main() {} LL | | fn main() {}
| |____________^ | |____________^
@ -66,7 +65,6 @@ LL | |
LL | | fn bar() { LL | | fn bar() {
LL | | fn foo() { LL | | fn foo() {
... | ... |
LL | |
LL | | fn main() {} LL | | fn main() {}
| |____________^ | |____________^
@ -124,7 +122,6 @@ LL | |
LL | | fn bar() { LL | | fn bar() {
LL | | fn foo() { LL | | fn foo() {
... | ... |
LL | |
LL | | fn main() {} LL | | fn main() {}
| |____________^ | |____________^
@ -173,7 +170,6 @@ LL | |
LL | | fn bar() { LL | | fn bar() {
LL | | fn foo() { LL | | fn foo() {
... | ... |
LL | |
LL | | fn main() {} LL | | fn main() {}
| |____________^ | |____________^

View file

@ -40,8 +40,6 @@ LL | v.call(|(), this: &mut S| {
| | | | | |
| _____| first borrow later used by call | _____| first borrow later used by call
| | | |
LL | |
LL | |
... | ... |
LL | | v.set(); LL | | v.set();
| | - first borrow occurs due to use of `v` in closure | | - first borrow occurs due to use of `v` in closure

View file

@ -16,7 +16,6 @@ LL | |
LL | | LL | |
LL | | m[0] += 10; LL | | m[0] += 10;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -39,7 +38,6 @@ LL | |
LL | | LL | |
LL | | m[0] += 10; LL | | m[0] += 10;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -16,7 +16,6 @@ LL | |
LL | | LL | |
LL | | let p = t.0.0; LL | | let p = t.0.0;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -39,7 +38,6 @@ LL | |
LL | | LL | |
LL | | let p = t.0.0; LL | | let p = t.0.0;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -16,7 +16,6 @@ LL | |
LL | | LL | |
LL | | println!("{:?}", p); LL | | println!("{:?}", p);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -49,7 +48,6 @@ LL | |
LL | | LL | |
LL | | println!("{:?}", p); LL | | println!("{:?}", p);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -16,7 +16,6 @@ LL | |
LL | | LL | |
LL | | let _x = p.x; LL | | let _x = p.x;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -39,7 +38,6 @@ LL | |
LL | | LL | |
LL | | let _x = p.x; LL | | let _x = p.x;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -16,7 +16,6 @@ LL | |
LL | | LL | |
LL | | let _x = a.b.c; LL | | let _x = a.b.c;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -39,7 +38,6 @@ LL | |
LL | | LL | |
LL | | let _x = a.b.c; LL | | let _x = a.b.c;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -16,7 +16,6 @@ LL | |
LL | | LL | |
LL | | let _x = a.b; LL | | let _x = a.b;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -39,7 +38,6 @@ LL | |
LL | | LL | |
LL | | let _x = a.b; LL | | let _x = a.b;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -15,8 +15,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", p.x); LL | | println!("{}", p.x);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -33,8 +32,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", p.x); LL | | println!("{}", p.x);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -15,8 +15,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", t.0); LL | | println!("{}", t.0);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -33,8 +32,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", t.0); LL | | println!("{}", t.0);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -26,7 +26,6 @@ LL | |
LL | | LL | |
LL | | if let Info::Point(_, _, str) = point { LL | | if let Info::Point(_, _, str) = point {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -59,7 +58,6 @@ LL | |
LL | | LL | |
LL | | if let Info::Point(_, _, str) = point { LL | | if let Info::Point(_, _, str) = point {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -16,7 +16,6 @@ LL | |
LL | | LL | |
LL | | let x = &p.a.p.x; LL | | let x = &p.a.p.x;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -44,7 +43,6 @@ LL | |
LL | | LL | |
LL | | let x = &p.a.p.x; LL | | let x = &p.a.p.x;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -16,7 +16,6 @@ LL | |
LL | | LL | |
LL | | let x = &t.0.0.0; LL | | let x = &t.0.0.0;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -44,7 +43,6 @@ LL | |
LL | | LL | |
LL | | let x = &t.0.0.0; LL | | let x = &t.0.0.0;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -15,8 +15,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | println!("This uses new capture analyysis to capture s={}", s); LL | | println!("This uses new capture analyysis to capture s={}", s);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -33,8 +32,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | println!("This uses new capture analyysis to capture s={}", s); LL | | println!("This uses new capture analyysis to capture s={}", s);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -15,8 +15,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | unsafe { u.value } LL | | unsafe { u.value }
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -33,8 +32,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | unsafe { u.value } LL | | unsafe { u.value }
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -23,11 +23,7 @@ error: First Pass analysis includes:
| |
LL | let x = #[rustc_capture_analysis] move || { LL | let x = #[rustc_capture_analysis] move || {
| _______________________________________^ | _______________________________________^
LL | |
LL | |
LL | |
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -42,11 +38,7 @@ error: Min Capture analysis includes:
| |
LL | let x = #[rustc_capture_analysis] move || { LL | let x = #[rustc_capture_analysis] move || {
| _______________________________________^ | _______________________________________^
LL | |
LL | |
LL | |
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -61,11 +53,7 @@ error: First Pass analysis includes:
| |
LL | let c = #[rustc_capture_analysis] move || { LL | let c = #[rustc_capture_analysis] move || {
| _______________________________________^ | _______________________________________^
LL | |
LL | |
LL | |
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -80,11 +68,7 @@ error: Min Capture analysis includes:
| |
LL | let c = #[rustc_capture_analysis] move || { LL | let c = #[rustc_capture_analysis] move || {
| _______________________________________^ | _______________________________________^
LL | |
LL | |
LL | |
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -6,7 +6,6 @@ LL | |
LL | | LL | |
LL | | match variant { LL | | match variant {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -24,7 +23,6 @@ LL | |
LL | | LL | |
LL | | match variant { LL | | match variant {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -64,7 +62,6 @@ LL | |
LL | | LL | |
LL | | match variant { LL | | match variant {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -87,7 +84,6 @@ LL | |
LL | | LL | |
LL | | match variant { LL | | match variant {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -138,7 +134,6 @@ LL | |
LL | | LL | |
LL | | match variant { LL | | match variant {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -156,7 +151,6 @@ LL | |
LL | | LL | |
LL | | match variant { LL | | match variant {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -174,7 +168,6 @@ LL | |
LL | | LL | |
LL | | match slice { LL | | match slice {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -192,7 +185,6 @@ LL | |
LL | | LL | |
LL | | match slice { LL | | match slice {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -210,7 +202,6 @@ LL | |
LL | | LL | |
LL | | match slice { LL | | match slice {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -228,7 +219,6 @@ LL | |
LL | | LL | |
LL | | match slice { LL | | match slice {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -246,7 +236,6 @@ LL | |
LL | | LL | |
LL | | match slice { LL | | match slice {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -264,7 +253,6 @@ LL | |
LL | | LL | |
LL | | match slice { LL | | match slice {
... | ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -281,8 +269,7 @@ LL | / || {
LL | | LL | |
LL | | match slice { LL | | match slice {
LL | | [..] => {}, LL | | [..] => {},
LL | | _ => {} ... |
LL | | }
LL | | }; LL | | };
| |_____^ | |_____^

View file

@ -139,8 +139,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | t.0.0 = "new S".into(); LL | | t.0.0 = "new S".into();
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -157,8 +156,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | t.0.0 = "new S".into(); LL | | t.0.0 = "new S".into();
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -175,8 +173,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | *ref_s += 10; LL | | *ref_s += 10;
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -193,8 +190,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | *ref_s += 10; LL | | *ref_s += 10;
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -211,8 +207,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | t.0.0 = "new s".into(); LL | | t.0.0 = "new s".into();
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -229,8 +224,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | t.0.0 = "new s".into(); LL | | t.0.0 = "new s".into();
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -247,8 +241,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | let _t = t.0.0; LL | | let _t = t.0.0;
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -265,8 +258,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | let _t = t.0.0; LL | | let _t = t.0.0;
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -283,8 +275,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | let _t = t.0.0; LL | | let _t = t.0.0;
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -301,8 +292,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | let _t = t.0.0; LL | | let _t = t.0.0;
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -319,8 +309,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | let _t = b.0; LL | | let _t = b.0;
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -337,8 +326,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | let _t = b.0; LL | | let _t = b.0;
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -355,8 +343,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", b.0); LL | | println!("{}", b.0);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -373,8 +360,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", b.0); LL | | println!("{}", b.0);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -391,8 +377,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", t.1.0); LL | | println!("{}", t.1.0);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -409,8 +394,7 @@ LL | / move || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", t.1.0); LL | | println!("{}", t.1.0);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -15,8 +15,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", w.p.x); LL | | println!("{}", w.p.x);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -33,8 +32,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", w.p.x); LL | | println!("{}", w.p.x);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -60,7 +60,6 @@ LL | |
LL | | LL | |
LL | | println!("{}", p.x); LL | | println!("{}", p.x);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -88,7 +87,6 @@ LL | |
LL | | LL | |
LL | | println!("{}", p.x); LL | | println!("{}", p.x);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -15,8 +15,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", pent.points[5].x); LL | | println!("{}", pent.points[5].x);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -33,8 +32,7 @@ LL | / || {
LL | | LL | |
LL | | LL | |
LL | | println!("{}", pent.points[5].x); LL | | println!("{}", pent.points[5].x);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -36,7 +36,6 @@ LL | |
LL | | LL | |
LL | | println!("{:?}", a.0); LL | | println!("{:?}", a.0);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -69,7 +68,6 @@ LL | |
LL | | LL | |
LL | | println!("{:?}", a.0); LL | | println!("{:?}", a.0);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -102,7 +100,6 @@ LL | |
LL | | LL | |
LL | | println!("{:?}", a.1); LL | | println!("{:?}", a.1);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -135,7 +132,6 @@ LL | |
LL | | LL | |
LL | | println!("{:?}", a.1); LL | | println!("{:?}", a.1);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -168,7 +164,6 @@ LL | |
LL | | LL | |
LL | | println!("{:?}", b.1); LL | | println!("{:?}", b.1);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -201,7 +196,6 @@ LL | |
LL | | LL | |
LL | | println!("{:?}", b.1); LL | | println!("{:?}", b.1);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -118,7 +118,6 @@ LL | |
LL | | LL | |
LL | | println!("{}", foo.x); LL | | println!("{}", foo.x);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -141,7 +140,6 @@ LL | |
LL | | LL | |
LL | | println!("{}", foo.x); LL | | println!("{}", foo.x);
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -16,7 +16,6 @@ LL | |
LL | | LL | |
LL | | p.x += 10; LL | | p.x += 10;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -39,7 +38,6 @@ LL | |
LL | | LL | |
LL | | p.x += 10; LL | | p.x += 10;
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -25,8 +25,7 @@ LL | / || unsafe {
LL | | LL | |
LL | | LL | |
LL | | println!("{:?}", (*t.0).s); LL | | println!("{:?}", (*t.0).s);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -43,8 +42,7 @@ LL | / || unsafe {
LL | | LL | |
LL | | LL | |
LL | | println!("{:?}", (*t.0).s); LL | | println!("{:?}", (*t.0).s);
LL | | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -32,11 +32,7 @@ error: First Pass analysis includes:
--> $DIR/wild_patterns.rs:26:5 --> $DIR/wild_patterns.rs:26:5
| |
LL | / || { LL | / || {
LL | |
LL | |
LL | | // FIXME(arora-aman): Change `_x` to `_`
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -50,11 +46,7 @@ error: Min Capture analysis includes:
--> $DIR/wild_patterns.rs:26:5 --> $DIR/wild_patterns.rs:26:5
| |
LL | / || { LL | / || {
LL | |
LL | |
LL | | // FIXME(arora-aman): Change `_x` to `_`
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -68,11 +60,7 @@ error: First Pass analysis includes:
--> $DIR/wild_patterns.rs:45:5 --> $DIR/wild_patterns.rs:45:5
| |
LL | / || { LL | / || {
LL | |
LL | |
LL | | // FIXME(arora-aman): Change `_x` to `_`
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -86,11 +74,7 @@ error: Min Capture analysis includes:
--> $DIR/wild_patterns.rs:45:5 --> $DIR/wild_patterns.rs:45:5
| |
LL | / || { LL | / || {
LL | |
LL | |
LL | | // FIXME(arora-aman): Change `_x` to `_`
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -104,11 +88,7 @@ error: First Pass analysis includes:
--> $DIR/wild_patterns.rs:64:5 --> $DIR/wild_patterns.rs:64:5
| |
LL | / || { LL | / || {
LL | |
LL | |
LL | | // FIXME(arora-aman): Change `_x` to `_`
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |
@ -122,11 +102,7 @@ error: Min Capture analysis includes:
--> $DIR/wild_patterns.rs:64:5 --> $DIR/wild_patterns.rs:64:5
| |
LL | / || { LL | / || {
LL | |
LL | |
LL | | // FIXME(arora-aman): Change `_x` to `_`
... | ... |
LL | |
LL | | }; LL | | };
| |_____^ | |_____^
| |

View file

@ -1,4 +1,4 @@
<svg width="743px" height="848px" xmlns="http://www.w3.org/2000/svg"> <svg width="743px" height="758px" xmlns="http://www.w3.org/2000/svg">
<style> <style>
.fg { fill: #AAAAAA } .fg { fill: #AAAAAA }
.bg { background: #000000 } .bg { background: #000000 }
@ -33,83 +33,73 @@
</tspan> </tspan>
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold"> _________________-</tspan> <tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold"> _________________-</tspan>
</tspan> </tspan>
<tspan x="10px" y="154px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> // last line shown in multispan header</tspan> <tspan x="10px" y="154px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
</tspan> </tspan>
<tspan x="10px" y="172px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> <tspan x="10px" y="172px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ),</tspan>
</tspan> </tspan>
<tspan x="10px" y="190px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> <tspan x="10px" y="190px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________-</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">this is found to be of type `()`</tspan>
</tspan> </tspan>
<tspan x="10px" y="208px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ),</tspan> <tspan x="10px" y="208px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> false =&gt; "</tspan>
</tspan> </tspan>
<tspan x="10px" y="226px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________-</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">this is found to be of type `()`</tspan> <tspan x="10px" y="226px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold"> __________________^</tspan>
</tspan> </tspan>
<tspan x="10px" y="244px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> false =&gt; "</tspan> <tspan x="10px" y="244px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan>
</tspan> </tspan>
<tspan x="10px" y="262px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold"> __________________^</tspan> <tspan x="10px" y="262px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ",</tspan>
</tspan> </tspan>
<tspan x="10px" y="280px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan> <tspan x="10px" y="280px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|_________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">expected `()`, found `&amp;str`</tspan>
</tspan> </tspan>
<tspan x="10px" y="298px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan> <tspan x="10px" y="298px">
</tspan> </tspan>
<tspan x="10px" y="316px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ",</tspan> <tspan x="10px" y="316px"><tspan class="fg-ansi256-009 bold">error[E0308]</tspan><tspan class="bold">: `match` arms have incompatible types</tspan>
</tspan> </tspan>
<tspan x="10px" y="334px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|_________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">expected `()`, found `&amp;str`</tspan> <tspan x="10px" y="334px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/huge_multispan_highlight.rs:216:18</tspan>
</tspan> </tspan>
<tspan x="10px" y="352px"> <tspan x="10px" y="352px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
</tspan> </tspan>
<tspan x="10px" y="370px"><tspan class="fg-ansi256-009 bold">error[E0308]</tspan><tspan class="bold">: `match` arms have incompatible types</tspan> <tspan x="10px" y="370px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> let _ = match true {</tspan>
</tspan> </tspan>
<tspan x="10px" y="388px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/huge_multispan_highlight.rs:216:18</tspan> <tspan x="10px" y="388px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">----------</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">`match` arms have incompatible types</tspan>
</tspan> </tspan>
<tspan x="10px" y="406px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> <tspan x="10px" y="406px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> true =&gt; (</tspan>
</tspan> </tspan>
<tspan x="10px" y="424px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> let _ = match true {</tspan> <tspan x="10px" y="424px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold"> _________________-</tspan>
</tspan> </tspan>
<tspan x="10px" y="442px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">----------</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">`match` arms have incompatible types</tspan> <tspan x="10px" y="442px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
</tspan> </tspan>
<tspan x="10px" y="460px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> true =&gt; (</tspan> <tspan x="10px" y="460px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> 1 // last line shown in multispan header</tspan>
</tspan> </tspan>
<tspan x="10px" y="478px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold"> _________________-</tspan> <tspan x="10px" y="478px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
</tspan> </tspan>
<tspan x="10px" y="496px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> <tspan x="10px" y="496px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ),</tspan>
</tspan> </tspan>
<tspan x="10px" y="514px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> 1 // last line shown in multispan header</tspan> <tspan x="10px" y="514px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________-</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">this is found to be of type `{integer}`</tspan>
</tspan> </tspan>
<tspan x="10px" y="532px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> <tspan x="10px" y="532px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> false =&gt; "</tspan>
</tspan> </tspan>
<tspan x="10px" y="550px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> <tspan x="10px" y="550px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold"> __________________^</tspan>
</tspan> </tspan>
<tspan x="10px" y="568px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ),</tspan> <tspan x="10px" y="568px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan>
</tspan> </tspan>
<tspan x="10px" y="586px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________-</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">this is found to be of type `{integer}`</tspan> <tspan x="10px" y="586px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan>
</tspan> </tspan>
<tspan x="10px" y="604px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> false =&gt; "</tspan> <tspan x="10px" y="604px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> 1 last line shown in multispan</tspan>
</tspan> </tspan>
<tspan x="10px" y="622px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold"> __________________^</tspan> <tspan x="10px" y="622px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan>
</tspan> </tspan>
<tspan x="10px" y="640px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan> <tspan x="10px" y="640px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ",</tspan>
</tspan> </tspan>
<tspan x="10px" y="658px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan> <tspan x="10px" y="658px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|_________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">expected integer, found `&amp;str`</tspan>
</tspan> </tspan>
<tspan x="10px" y="676px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> 1 last line shown in multispan</tspan> <tspan x="10px" y="676px">
</tspan> </tspan>
<tspan x="10px" y="694px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan> <tspan x="10px" y="694px"><tspan class="fg-ansi256-009 bold">error</tspan><tspan class="bold">: aborting due to 2 previous errors</tspan>
</tspan> </tspan>
<tspan x="10px" y="712px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan> <tspan x="10px" y="712px">
</tspan> </tspan>
<tspan x="10px" y="730px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ",</tspan> <tspan x="10px" y="730px"><tspan class="bold">For more information about this error, try `rustc --explain E0308`.</tspan>
</tspan> </tspan>
<tspan x="10px" y="748px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|_________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">expected integer, found `&amp;str`</tspan> <tspan x="10px" y="748px">
</tspan>
<tspan x="10px" y="766px">
</tspan>
<tspan x="10px" y="784px"><tspan class="fg-ansi256-009 bold">error</tspan><tspan class="bold">: aborting due to 2 previous errors</tspan>
</tspan>
<tspan x="10px" y="802px">
</tspan>
<tspan x="10px" y="820px"><tspan class="bold">For more information about this error, try `rustc --explain E0308`.</tspan>
</tspan>
<tspan x="10px" y="838px">
</tspan> </tspan>
</text> </text>

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more