diff --git a/tests/ui/async_yields_async.stderr b/tests/ui/async_yields_async.stderr index 474914299d069..8c023d0d61f4a 100644 --- a/tests/ui/async_yields_async.stderr +++ b/tests/ui/async_yields_async.stderr @@ -14,9 +14,9 @@ LL | | }; = help: to override `-D warnings` add `#[allow(clippy::async_yields_async)]` help: consider awaiting this value | -LL ~ async { -LL + 3 -LL + }.await +LL | async { +LL | 3 +LL ~ }.await | error: an async construct yields a type which is itself awaitable @@ -46,9 +46,9 @@ LL | | }; | help: consider awaiting this value | -LL ~ async { -LL + 3 -LL + }.await +LL | async { +LL | 3 +LL ~ }.await | error: an async construct yields a type which is itself awaitable diff --git a/tests/ui/borrow_deref_ref_unfixable.stderr b/tests/ui/borrow_deref_ref_unfixable.stderr index 71f43af46c241..b8a0eedeb9ee8 100644 --- a/tests/ui/borrow_deref_ref_unfixable.stderr +++ b/tests/ui/borrow_deref_ref_unfixable.stderr @@ -13,9 +13,8 @@ LL + let x: &str = s; | help: if you would like to deref, try using `&**` | -LL - let x: &str = &*s; -LL + let x: &str = &**s; - | +LL | let x: &str = &**s; + | + error: aborting due to 1 previous error diff --git a/tests/ui/fn_to_numeric_cast_any.stderr b/tests/ui/fn_to_numeric_cast_any.stderr index c069c9d1672de..0238e3a91369b 100644 --- a/tests/ui/fn_to_numeric_cast_any.stderr +++ b/tests/ui/fn_to_numeric_cast_any.stderr @@ -8,9 +8,8 @@ LL | let _ = foo as i8; = help: to override `-D warnings` add `#[allow(clippy::fn_to_numeric_cast_any)]` help: did you mean to invoke the function? | -LL - let _ = foo as i8; -LL + let _ = foo() as i8; - | +LL | let _ = foo() as i8; + | ++ error: casting function pointer `foo` to `i16` --> tests/ui/fn_to_numeric_cast_any.rs:26:13 @@ -20,9 +19,8 @@ LL | let _ = foo as i16; | help: did you mean to invoke the function? | -LL - let _ = foo as i16; -LL + let _ = foo() as i16; - | +LL | let _ = foo() as i16; + | ++ error: casting function pointer `foo` to `i32` --> tests/ui/fn_to_numeric_cast_any.rs:28:13 @@ -32,9 +30,8 @@ LL | let _ = foo as i32; | help: did you mean to invoke the function? | -LL - let _ = foo as i32; -LL + let _ = foo() as i32; - | +LL | let _ = foo() as i32; + | ++ error: casting function pointer `foo` to `i64` --> tests/ui/fn_to_numeric_cast_any.rs:30:13 @@ -44,9 +41,8 @@ LL | let _ = foo as i64; | help: did you mean to invoke the function? | -LL - let _ = foo as i64; -LL + let _ = foo() as i64; - | +LL | let _ = foo() as i64; + | ++ error: casting function pointer `foo` to `i128` --> tests/ui/fn_to_numeric_cast_any.rs:32:13 @@ -56,9 +52,8 @@ LL | let _ = foo as i128; | help: did you mean to invoke the function? | -LL - let _ = foo as i128; -LL + let _ = foo() as i128; - | +LL | let _ = foo() as i128; + | ++ error: casting function pointer `foo` to `isize` --> tests/ui/fn_to_numeric_cast_any.rs:34:13 @@ -68,9 +63,8 @@ LL | let _ = foo as isize; | help: did you mean to invoke the function? | -LL - let _ = foo as isize; -LL + let _ = foo() as isize; - | +LL | let _ = foo() as isize; + | ++ error: casting function pointer `foo` to `u8` --> tests/ui/fn_to_numeric_cast_any.rs:37:13 @@ -80,9 +74,8 @@ LL | let _ = foo as u8; | help: did you mean to invoke the function? | -LL - let _ = foo as u8; -LL + let _ = foo() as u8; - | +LL | let _ = foo() as u8; + | ++ error: casting function pointer `foo` to `u16` --> tests/ui/fn_to_numeric_cast_any.rs:39:13 @@ -92,9 +85,8 @@ LL | let _ = foo as u16; | help: did you mean to invoke the function? | -LL - let _ = foo as u16; -LL + let _ = foo() as u16; - | +LL | let _ = foo() as u16; + | ++ error: casting function pointer `foo` to `u32` --> tests/ui/fn_to_numeric_cast_any.rs:41:13 @@ -104,9 +96,8 @@ LL | let _ = foo as u32; | help: did you mean to invoke the function? | -LL - let _ = foo as u32; -LL + let _ = foo() as u32; - | +LL | let _ = foo() as u32; + | ++ error: casting function pointer `foo` to `u64` --> tests/ui/fn_to_numeric_cast_any.rs:43:13 @@ -116,9 +107,8 @@ LL | let _ = foo as u64; | help: did you mean to invoke the function? | -LL - let _ = foo as u64; -LL + let _ = foo() as u64; - | +LL | let _ = foo() as u64; + | ++ error: casting function pointer `foo` to `u128` --> tests/ui/fn_to_numeric_cast_any.rs:45:13 @@ -128,9 +118,8 @@ LL | let _ = foo as u128; | help: did you mean to invoke the function? | -LL - let _ = foo as u128; -LL + let _ = foo() as u128; - | +LL | let _ = foo() as u128; + | ++ error: casting function pointer `foo` to `usize` --> tests/ui/fn_to_numeric_cast_any.rs:47:13 @@ -140,9 +129,8 @@ LL | let _ = foo as usize; | help: did you mean to invoke the function? | -LL - let _ = foo as usize; -LL + let _ = foo() as usize; - | +LL | let _ = foo() as usize; + | ++ error: casting function pointer `Struct::static_method` to `usize` --> tests/ui/fn_to_numeric_cast_any.rs:52:13 @@ -152,9 +140,8 @@ LL | let _ = Struct::static_method as usize; | help: did you mean to invoke the function? | -LL - let _ = Struct::static_method as usize; -LL + let _ = Struct::static_method() as usize; - | +LL | let _ = Struct::static_method() as usize; + | ++ error: casting function pointer `f` to `usize` --> tests/ui/fn_to_numeric_cast_any.rs:57:5 @@ -164,9 +151,8 @@ LL | f as usize | help: did you mean to invoke the function? | -LL - f as usize -LL + f() as usize - | +LL | f() as usize + | ++ error: casting function pointer `T::static_method` to `usize` --> tests/ui/fn_to_numeric_cast_any.rs:62:5 @@ -176,9 +162,8 @@ LL | T::static_method as usize | help: did you mean to invoke the function? | -LL - T::static_method as usize -LL + T::static_method() as usize - | +LL | T::static_method() as usize + | ++ error: casting function pointer `(clos as fn(u32) -> u32)` to `usize` --> tests/ui/fn_to_numeric_cast_any.rs:69:13 @@ -188,9 +173,8 @@ LL | let _ = (clos as fn(u32) -> u32) as usize; | help: did you mean to invoke the function? | -LL - let _ = (clos as fn(u32) -> u32) as usize; -LL + let _ = (clos as fn(u32) -> u32)() as usize; - | +LL | let _ = (clos as fn(u32) -> u32)() as usize; + | ++ error: casting function pointer `foo` to `*const ()` --> tests/ui/fn_to_numeric_cast_any.rs:74:13 @@ -200,9 +184,8 @@ LL | let _ = foo as *const (); | help: did you mean to invoke the function? | -LL - let _ = foo as *const (); -LL + let _ = foo() as *const (); - | +LL | let _ = foo() as *const (); + | ++ error: aborting due to 17 previous errors diff --git a/tests/ui/implicit_hasher.stderr b/tests/ui/implicit_hasher.stderr index 6e964c65a2e42..01d08a1bd9b2a 100644 --- a/tests/ui/implicit_hasher.stderr +++ b/tests/ui/implicit_hasher.stderr @@ -78,9 +78,8 @@ LL | pub fn map(map: &mut HashMap) {} | help: add a type parameter for `BuildHasher` | -LL - pub fn map(map: &mut HashMap) {} -LL + pub fn map(map: &mut HashMap) {} - | +LL | pub fn map(map: &mut HashMap) {} + | +++++++++++++++++++++++++++++ +++ error: parameter of type `HashSet` should be generalized over different hashers --> tests/ui/implicit_hasher.rs:70:22 @@ -90,9 +89,8 @@ LL | pub fn set(set: &mut HashSet) {} | help: add a type parameter for `BuildHasher` | -LL - pub fn set(set: &mut HashSet) {} -LL + pub fn set(set: &mut HashSet) {} - | +LL | pub fn set(set: &mut HashSet) {} + | +++++++++++++++++++++++++++++ +++ error: impl for `HashMap` should be generalized over different hashers --> tests/ui/implicit_hasher.rs:76:43 @@ -116,9 +114,8 @@ LL | pub async fn election_vote(_data: HashMap) {} | help: add a type parameter for `BuildHasher` | -LL - pub async fn election_vote(_data: HashMap) {} -LL + pub async fn election_vote(_data: HashMap) {} - | +LL | pub async fn election_vote(_data: HashMap) {} + | +++++++++++++++++++++++++++++ +++ error: aborting due to 9 previous errors diff --git a/tests/ui/implicit_return.stderr b/tests/ui/implicit_return.stderr index 7ea72307450c7..936a779fa747d 100644 --- a/tests/ui/implicit_return.stderr +++ b/tests/ui/implicit_return.stderr @@ -9,7 +9,7 @@ LL | true help: add `return` as shown | LL | return true - | + | ++++++ error: missing `return` statement --> tests/ui/implicit_return.rs:19:15 @@ -122,7 +122,7 @@ LL | format!("test {}", "test") help: add `return` as shown | LL | return format!("test {}", "test") - | + | ++++++ error: missing `return` statement --> tests/ui/implicit_return.rs:90:5 @@ -133,7 +133,7 @@ LL | m!(true, false) help: add `return` as shown | LL | return m!(true, false) - | + | ++++++ error: missing `return` statement --> tests/ui/implicit_return.rs:96:13 @@ -169,10 +169,8 @@ LL | | } | help: add `return` as shown | -LL ~ return loop { -LL + m!(true); -LL + } - | +LL | return loop { + | ++++++ error: missing `return` statement --> tests/ui/implicit_return.rs:130:5 @@ -183,7 +181,7 @@ LL | true help: add `return` as shown | LL | return true - | + | ++++++ error: aborting due to 16 previous errors diff --git a/tests/ui/literals.stderr b/tests/ui/literals.stderr index a9192825b3543..576b38a47d2de 100644 --- a/tests/ui/literals.stderr +++ b/tests/ui/literals.stderr @@ -99,9 +99,8 @@ LL + let fail8 = 123; | help: if you mean to use an octal constant, use `0o` | -LL - let fail8 = 0123; -LL + let fail8 = 0o123; - | +LL | let fail8 = 0o123; + | + error: integer type suffix should not be separated by an underscore --> tests/ui/literals.rs:48:16 diff --git a/tests/ui/manual_flatten.stderr b/tests/ui/manual_flatten.stderr index cf1b0a1c8bbf6..93f7f11b5e64c 100644 --- a/tests/ui/manual_flatten.stderr +++ b/tests/ui/manual_flatten.stderr @@ -196,11 +196,9 @@ LL | | } | |_________^ help: try | -LL ~ for n in vec![ -LL + -LL + Some(1), -LL + Some(2), -LL + Some(3) +LL | for n in vec![ +... +LL | Some(3) LL ~ ].iter().flatten() { | diff --git a/tests/ui/octal_escapes.stderr b/tests/ui/octal_escapes.stderr index c8a89ac8bea42..61c781e316ef3 100644 --- a/tests/ui/octal_escapes.stderr +++ b/tests/ui/octal_escapes.stderr @@ -14,9 +14,8 @@ LL + let _bad1 = "\x1b[0m"; | help: if a null escape is intended, disambiguate using | -LL - let _bad1 = "\033[0m"; -LL + let _bad1 = "\x0033[0m"; - | +LL | let _bad1 = "\x0033[0m"; + | ++ error: octal-looking escape in a literal --> tests/ui/octal_escapes.rs:6:19 @@ -31,9 +30,8 @@ LL + let _bad2 = b"\x1b[0m"; | help: if a null escape is intended, disambiguate using | -LL - let _bad2 = b"\033[0m"; -LL + let _bad2 = b"\x0033[0m"; - | +LL | let _bad2 = b"\x0033[0m"; + | ++ error: octal-looking escape in a literal --> tests/ui/octal_escapes.rs:7:20 @@ -48,9 +46,8 @@ LL + let _bad3 = "\\\x1b[0m"; | help: if a null escape is intended, disambiguate using | -LL - let _bad3 = "\\\033[0m"; -LL + let _bad3 = "\\\x0033[0m"; - | +LL | let _bad3 = "\\\x0033[0m"; + | ++ error: octal-looking escape in a literal --> tests/ui/octal_escapes.rs:9:18 @@ -65,9 +62,8 @@ LL + let _bad4 = "\x0a34567"; | help: if a null escape is intended, disambiguate using | -LL - let _bad4 = "\01234567"; -LL + let _bad4 = "\x001234567"; - | +LL | let _bad4 = "\x001234567"; + | ++ error: octal-looking escape in a literal --> tests/ui/octal_escapes.rs:10:20 @@ -77,14 +73,12 @@ LL | let _bad5 = "\0\03"; | help: if an octal escape is intended, use a hex escape instead | -LL - let _bad5 = "\0\03"; -LL + let _bad5 = "\0\x03"; - | +LL | let _bad5 = "\0\x03"; + | + help: if a null escape is intended, disambiguate using | -LL - let _bad5 = "\0\03"; -LL + let _bad5 = "\0\x0003"; - | +LL | let _bad5 = "\0\x0003"; + | +++ error: octal-looking escape in a literal --> tests/ui/octal_escapes.rs:11:23 @@ -99,9 +93,8 @@ LL + let _bad6 = "Text-\x2d\077-MoreText"; | help: if a null escape is intended, disambiguate using | -LL - let _bad6 = "Text-\055\077-MoreText"; -LL + let _bad6 = "Text-\x0055\077-MoreText"; - | +LL | let _bad6 = "Text-\x0055\077-MoreText"; + | ++ error: octal-looking escape in a literal --> tests/ui/octal_escapes.rs:11:27 @@ -116,9 +109,8 @@ LL + let _bad6 = "Text-\055\x3f-MoreText"; | help: if a null escape is intended, disambiguate using | -LL - let _bad6 = "Text-\055\077-MoreText"; -LL + let _bad6 = "Text-\055\x0077-MoreText"; - | +LL | let _bad6 = "Text-\055\x0077-MoreText"; + | ++ error: octal-looking escape in a literal --> tests/ui/octal_escapes.rs:14:31 @@ -128,14 +120,12 @@ LL | let _bad7 = "EvenMoreText-\01\02-ShortEscapes"; | help: if an octal escape is intended, use a hex escape instead | -LL - let _bad7 = "EvenMoreText-\01\02-ShortEscapes"; -LL + let _bad7 = "EvenMoreText-\x01\02-ShortEscapes"; - | +LL | let _bad7 = "EvenMoreText-\x01\02-ShortEscapes"; + | + help: if a null escape is intended, disambiguate using | -LL - let _bad7 = "EvenMoreText-\01\02-ShortEscapes"; -LL + let _bad7 = "EvenMoreText-\x0001\02-ShortEscapes"; - | +LL | let _bad7 = "EvenMoreText-\x0001\02-ShortEscapes"; + | +++ error: octal-looking escape in a literal --> tests/ui/octal_escapes.rs:14:34 @@ -145,14 +135,12 @@ LL | let _bad7 = "EvenMoreText-\01\02-ShortEscapes"; | help: if an octal escape is intended, use a hex escape instead | -LL - let _bad7 = "EvenMoreText-\01\02-ShortEscapes"; -LL + let _bad7 = "EvenMoreText-\01\x02-ShortEscapes"; - | +LL | let _bad7 = "EvenMoreText-\01\x02-ShortEscapes"; + | + help: if a null escape is intended, disambiguate using | -LL - let _bad7 = "EvenMoreText-\01\02-ShortEscapes"; -LL + let _bad7 = "EvenMoreText-\01\x0002-ShortEscapes"; - | +LL | let _bad7 = "EvenMoreText-\01\x0002-ShortEscapes"; + | +++ error: octal-looking escape in a literal --> tests/ui/octal_escapes.rs:17:19 @@ -162,14 +150,12 @@ LL | let _bad8 = "锈\01锈"; | help: if an octal escape is intended, use a hex escape instead | -LL - let _bad8 = "锈\01锈"; -LL + let _bad8 = "锈\x01锈"; - | +LL | let _bad8 = "锈\x01锈"; + | + help: if a null escape is intended, disambiguate using | -LL - let _bad8 = "锈\01锈"; -LL + let _bad8 = "锈\x0001锈"; - | +LL | let _bad8 = "锈\x0001锈"; + | +++ error: octal-looking escape in a literal --> tests/ui/octal_escapes.rs:18:19 @@ -184,9 +170,8 @@ LL + let _bad9 = "锈\x09锈"; | help: if a null escape is intended, disambiguate using | -LL - let _bad9 = "锈\011锈"; -LL + let _bad9 = "锈\x0011锈"; - | +LL | let _bad9 = "锈\x0011锈"; + | ++ error: aborting due to 11 previous errors diff --git a/tests/ui/suspicious_to_owned.stderr b/tests/ui/suspicious_to_owned.stderr index 74bbcfcca51e1..2c26565d5ef14 100644 --- a/tests/ui/suspicious_to_owned.stderr +++ b/tests/ui/suspicious_to_owned.stderr @@ -8,9 +8,8 @@ LL | let _ = cow.to_owned(); = help: to override `-D warnings` add `#[allow(clippy::suspicious_to_owned)]` help: depending on intent, either make the Cow an Owned variant | -LL - let _ = cow.to_owned(); -LL + let _ = cow.into_owned(); - | +LL | let _ = cow.into_owned(); + | ++ help: or clone the Cow itself | LL - let _ = cow.to_owned(); @@ -25,9 +24,8 @@ LL | let _ = cow.to_owned(); | help: depending on intent, either make the Cow an Owned variant | -LL - let _ = cow.to_owned(); -LL + let _ = cow.into_owned(); - | +LL | let _ = cow.into_owned(); + | ++ help: or clone the Cow itself | LL - let _ = cow.to_owned(); @@ -42,9 +40,8 @@ LL | let _ = cow.to_owned(); | help: depending on intent, either make the Cow an Owned variant | -LL - let _ = cow.to_owned(); -LL + let _ = cow.into_owned(); - | +LL | let _ = cow.into_owned(); + | ++ help: or clone the Cow itself | LL - let _ = cow.to_owned(); @@ -59,9 +56,8 @@ LL | let _ = cow.to_owned(); | help: depending on intent, either make the Cow an Owned variant | -LL - let _ = cow.to_owned(); -LL + let _ = cow.into_owned(); - | +LL | let _ = cow.into_owned(); + | ++ help: or clone the Cow itself | LL - let _ = cow.to_owned(); diff --git a/tests/ui/too_long_first_doc_paragraph-fix.stderr b/tests/ui/too_long_first_doc_paragraph-fix.stderr index 6ef333f0cfd29..84a574017a9b7 100644 --- a/tests/ui/too_long_first_doc_paragraph-fix.stderr +++ b/tests/ui/too_long_first_doc_paragraph-fix.stderr @@ -12,7 +12,7 @@ LL | | /// 200 characters so I needed to write something longeeeeeeer. = help: to override `-D warnings` add `#[allow(clippy::too_long_first_doc_paragraph)]` help: add an empty line | -LL ~ /// A very short summary. +LL | /// A very short summary. LL + /// | diff --git a/tests/ui/too_long_first_doc_paragraph.stderr b/tests/ui/too_long_first_doc_paragraph.stderr index 95f42349b9b35..8bc853132ec0b 100644 --- a/tests/ui/too_long_first_doc_paragraph.stderr +++ b/tests/ui/too_long_first_doc_paragraph.stderr @@ -12,8 +12,8 @@ LL | | //! 200 characters so I needed to write something longeeeeeeer. = help: to override `-D warnings` add `#[allow(clippy::too_long_first_doc_paragraph)]` help: add an empty line | -LL ~ //! A very short summary. -LL + //! +LL | //! A very short summary. +LL ~ //! LL ~ //! A much longer explanation that goes into a lot more detail about |