Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ dependencies = [

[[package]]
name = "annotate-snippets"
version = "0.12.9"
version = "0.12.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a44baf24dd94e781f74dfe67ffee75a09a57971ddf0f615a178b4f6d404b48ff"
checksum = "15580ece6ea97cbf832d60ba19c021113469480852c6a2a6beb0db28f097bf1f"
dependencies = [
"anstyle",
"memchr",
Expand Down Expand Up @@ -3838,7 +3838,7 @@ dependencies = [
name = "rustc_errors"
version = "0.0.0"
dependencies = [
"annotate-snippets 0.12.9",
"annotate-snippets 0.12.10",
"anstream",
"anstyle",
"derive_setters",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_errors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2024"

[dependencies]
# tidy-alphabetical-start
annotate-snippets = { version = "0.12.9", features = ["simd"] }
annotate-snippets = { version = "0.12.10", features = ["simd"] }
anstream = "0.6.20"
anstyle = "1.0.13"
derive_setters = "0.1.6"
Expand Down
36 changes: 36 additions & 0 deletions src/tools/clippy/tests/ui/manual_async_fn.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ LL | fn fut() -> impl Future<Output = i32> {
help: make the function `async` and return the output of the future directly
|
LL - fn fut() -> impl Future<Output = i32> {
LL -
LL - async { 42 }
LL - }
LL + async fn fut() -> i32 { 42 }
|

Expand All @@ -21,6 +24,9 @@ LL | fn fut2() ->impl Future<Output = i32> {
help: make the function `async` and return the output of the future directly
|
LL - fn fut2() ->impl Future<Output = i32> {
LL -
LL - async { 42 }
LL - }
LL + async fn fut2() -> i32 { 42 }
|

Expand All @@ -33,6 +39,9 @@ LL | fn fut3()-> impl Future<Output = i32> {
help: make the function `async` and return the output of the future directly
|
LL - fn fut3()-> impl Future<Output = i32> {
LL -
LL - async { 42 }
LL - }
LL + async fn fut3() -> i32 { 42 }
|

Expand All @@ -45,6 +54,9 @@ LL | fn empty_fut() -> impl Future<Output = ()> {
help: make the function `async` and return the output of the future directly
|
LL - fn empty_fut() -> impl Future<Output = ()> {
LL -
LL - async {}
LL - }
LL + async fn empty_fut() {}
|

Expand All @@ -57,6 +69,9 @@ LL | fn empty_fut2() ->impl Future<Output = ()> {
help: make the function `async` and return the output of the future directly
|
LL - fn empty_fut2() ->impl Future<Output = ()> {
LL -
LL - async {}
LL - }
LL + async fn empty_fut2() {}
|

Expand All @@ -69,6 +84,9 @@ LL | fn empty_fut3()-> impl Future<Output = ()> {
help: make the function `async` and return the output of the future directly
|
LL - fn empty_fut3()-> impl Future<Output = ()> {
LL -
LL - async {}
LL - }
LL + async fn empty_fut3() {}
|

Expand All @@ -81,6 +99,9 @@ LL | fn core_fut() -> impl core::future::Future<Output = i32> {
help: make the function `async` and return the output of the future directly
|
LL - fn core_fut() -> impl core::future::Future<Output = i32> {
LL -
LL - async move { 42 }
LL - }
LL + async fn core_fut() -> i32 { 42 }
|

Expand Down Expand Up @@ -116,6 +137,9 @@ LL | fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
help: make the function `async` and return the output of the future directly
|
LL - fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
LL -
LL - async { 42 }
LL - }
LL + async fn elided(_: &i32) -> i32 { 42 }
|

Expand All @@ -128,6 +152,9 @@ LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> +
help: make the function `async` and return the output of the future directly
|
LL - fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b {
LL -
LL - async { 42 }
LL - }
LL + async fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> i32 { 42 }
|

Expand All @@ -140,6 +167,9 @@ LL | pub fn issue_10450() -> impl Future<Output = i32> {
help: make the function `async` and return the output of the future directly
|
LL - pub fn issue_10450() -> impl Future<Output = i32> {
LL -
LL - async { 42 }
LL - }
LL + pub async fn issue_10450() -> i32 { 42 }
|

Expand All @@ -152,6 +182,9 @@ LL | pub(crate) fn issue_10450_2() -> impl Future<Output = i32> {
help: make the function `async` and return the output of the future directly
|
LL - pub(crate) fn issue_10450_2() -> impl Future<Output = i32> {
LL -
LL - async { 42 }
LL - }
LL + pub(crate) async fn issue_10450_2() -> i32 { 42 }
|

Expand All @@ -164,6 +197,9 @@ LL | pub(self) fn issue_10450_3() -> impl Future<Output = i32> {
help: make the function `async` and return the output of the future directly
|
LL - pub(self) fn issue_10450_3() -> impl Future<Output = i32> {
LL -
LL - async { 42 }
LL - }
LL + pub(self) async fn issue_10450_3() -> i32 { 42 }
|

Expand Down
4 changes: 4 additions & 0 deletions src/tools/clippy/tests/ui/map_unwrap_or.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ LL | | .unwrap_or(0);
help: use `map_or(<a>, <f>)` instead
|
LL - let _ = opt.map(|x| x + 1)
LL -
LL - // Should lint even though this call is on a separate line.
LL - .unwrap_or(0);
LL + let _ = opt.map_or(0, |x| x + 1);
|

Expand Down Expand Up @@ -98,6 +101,7 @@ LL | | .unwrap_or(None);
help: use `and_then(<f>)` instead
|
LL - .map(|x| Some(x + 1))
LL - .unwrap_or(None);
LL + .and_then(|x| Some(x + 1));
|

Expand Down
1 change: 0 additions & 1 deletion src/tools/clippy/tests/ui/match_same_arms.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ help: otherwise remove the non-wildcard arms
|
LL - 2 => 'b',
LL - 3 => 'b',
LL + _ => 'b',
|

error: these match arms have identical bodies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ LL | | }
help: change this to
|
LL - fn partial_cmp(&self, _: &Self) -> Option<Ordering> {
LL - todo!();
LL - }
LL + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp(other)) }
|

Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/tests/ui/print_literal.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ LL | "name", 5, "x", 0.01
help: try
|
LL - "Hello {}: {2} is {3:.*} (which {3} with {1} places)",
LL - "name", 5, "x", 0.01
LL + "Hello name: x is {1:.*} (which {1} with {0} places)", 5, 0.01
|

Expand Down
3 changes: 3 additions & 0 deletions tests/ui/argument-suggestions/issue-112507.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ help: remove the extra arguments
|
LL - 0,
LL - None,
LL - None,
LL - 0,
LL - );
LL + None);
|

Expand Down
3 changes: 3 additions & 0 deletions tests/ui/lint/invalid-nan-comparison-suggestion.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ LL | | };
help: use `f32::is_nan()` or `f64::is_nan()` instead
|
LL - b != {
LL -
LL - &f32::NAN
LL - };
LL + !b.is_nan();
|

Expand Down
1 change: 1 addition & 0 deletions tests/ui/lint/unused/closure-body-issue-136741.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ help: remove these parentheses
|
LL - let _ = (0..).find(|n| (
LL - n % 2 == 0
LL - ));
LL + let _ = (0..).find(|n| n % 2 == 0);
|

Expand Down
3 changes: 3 additions & 0 deletions tests/ui/privacy/suggest-box-new.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ LL + wtf: Some(Box::new_in(_, _)),
help: consider using the `Default` trait
|
LL - wtf: Some(Box(U {
LL - wtf: None,
LL - x: (),
LL - })),
LL + wtf: Some(<Box as std::default::Default>::default()),
|

Expand Down
5 changes: 5 additions & 0 deletions tests/ui/suggestions/issue-109396.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ note: function defined here
help: remove the extra arguments
|
LL - file.as_raw_fd(),
LL -
LL - 0,
LL - 0,
LL - 0,
LL - );
LL + );
|

Expand Down
4 changes: 4 additions & 0 deletions tests/ui/suggestions/issue-109854.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ note: associated function defined here
help: remove the extra arguments
|
LL - generate_setter,
LL - r#"
LL - pub(crate) struct Person<T: Clone> {}
LL - "#,
LL - r#""#,
LL + /* usize */,
|

Expand Down
3 changes: 3 additions & 0 deletions tests/ui/suggestions/multi-suggestion.ascii.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ LL + wtf: Some(Box::new_in(_, _)),
help: consider using the `Default` trait
|
LL - wtf: Some(Box(U {
LL - wtf: None,
LL - x: (),
LL - })),
LL + wtf: Some(<Box as std::default::Default>::default()),
|

Expand Down
3 changes: 3 additions & 0 deletions tests/ui/suggestions/multi-suggestion.unicode.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ LL + wtf: Some(Box::new_in(_, _)),
help: consider using the `Default` trait
╭╴
LL - wtf: Some(Box(U {
LL - wtf: None,
LL - x: (),
LL - })),
LL + wtf: Some(<Box as std::default::Default>::default()),
╰╴

Expand Down
1 change: 1 addition & 0 deletions tests/ui/suggestions/suggest-remove-refs-3.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ LL | | .enumerate() {
help: consider removing 5 leading `&`-references
|
LL - for (i, _) in & & &
LL - & &v
LL + for (i, _) in v
|

Expand Down
Loading