From 018c4950b9406055dec02ef0fb52f132e2bb1e2c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:25:56 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/fn/bad-main.stderr | 2 +- tests/ui/fn/fn-bad-block-type.stderr | 2 +- tests/ui/fn/fn-closure-mutable-capture.stderr | 2 +- tests/ui/fn/fn-pointer-mismatch.rs | 12 ++++++------ tests/ui/fn/fn-pointer-mismatch.stderr | 16 ++++++++-------- .../ui/fn/implied-bounds-unnorm-associated-type-2.stderr | 2 +- .../ui/fn/implied-bounds-unnorm-associated-type-4.stderr | 2 +- .../ui/fn/implied-bounds-unnorm-associated-type-5.stderr | 2 +- tests/ui/fn/implied-bounds-unnorm-associated-type.stderr | 2 +- tests/ui/fn/issue-3044.stderr | 2 +- tests/ui/fn/issue-3099.stderr | 2 +- tests/ui/fn/issue-39259.stderr | 2 +- .../ui/fn/signature-error-reporting-under-verbose.stderr | 2 +- 13 files changed, 25 insertions(+), 25 deletions(-) (limited to 'tests/ui/fn') diff --git a/tests/ui/fn/bad-main.stderr b/tests/ui/fn/bad-main.stderr index 65140a079..47aa02c09 100644 --- a/tests/ui/fn/bad-main.stderr +++ b/tests/ui/fn/bad-main.stderr @@ -7,6 +7,6 @@ LL | fn main(x: isize) { } = note: expected signature `fn()` found signature `fn(isize)` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0580`. diff --git a/tests/ui/fn/fn-bad-block-type.stderr b/tests/ui/fn/fn-bad-block-type.stderr index 13ebfd1e2..6917bea65 100644 --- a/tests/ui/fn/fn-bad-block-type.stderr +++ b/tests/ui/fn/fn-bad-block-type.stderr @@ -6,6 +6,6 @@ LL | fn f() -> isize { true } | | | expected `isize` because of return type -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/fn/fn-closure-mutable-capture.stderr b/tests/ui/fn/fn-closure-mutable-capture.stderr index 03e3d545a..5a2f92250 100644 --- a/tests/ui/fn/fn-closure-mutable-capture.stderr +++ b/tests/ui/fn/fn-closure-mutable-capture.stderr @@ -10,6 +10,6 @@ LL | bar(move || x = 1); | | in this closure | expects `Fn` instead of `FnMut` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0594`. diff --git a/tests/ui/fn/fn-pointer-mismatch.rs b/tests/ui/fn/fn-pointer-mismatch.rs index 0597478cb..1c50d8b0f 100644 --- a/tests/ui/fn/fn-pointer-mismatch.rs +++ b/tests/ui/fn/fn-pointer-mismatch.rs @@ -35,20 +35,20 @@ fn main() { // suggest removing reference let c: fn(u32) -> u32 = &foo; //~^ ERROR mismatched types - //~| expected fn pointer `fn(u32) -> u32` - //~| found reference `&fn(u32) -> u32 {foo}` + //~| expected fn pointer `fn(_) -> _` + //~| found reference `&fn(_) -> _ {foo}` // suggest using reference let d: &fn(u32) -> u32 = foo; //~^ ERROR mismatched types - //~| expected reference `&fn(u32) -> u32` - //~| found fn item `fn(u32) -> u32 {foo}` + //~| expected reference `&fn(_) -> _` + //~| found fn item `fn(_) -> _ {foo}` // suggest casting with reference let e: &fn(u32) -> u32 = &foo; //~^ ERROR mismatched types - //~| expected reference `&fn(u32) -> u32` - //~| found reference `&fn(u32) -> u32 {foo}` + //~| expected reference `&fn(_) -> _` + //~| found reference `&fn(_) -> _ {foo}` // OK let mut z: fn(u32) -> u32 = foo as fn(u32) -> u32; diff --git a/tests/ui/fn/fn-pointer-mismatch.stderr b/tests/ui/fn/fn-pointer-mismatch.stderr index 87ece845b..9cda11639 100644 --- a/tests/ui/fn/fn-pointer-mismatch.stderr +++ b/tests/ui/fn/fn-pointer-mismatch.stderr @@ -6,8 +6,8 @@ LL | let g = if n % 2 == 0 { &foo } else { &bar }; | | | expected because of this | - = note: expected reference `&fn(u32) -> u32 {foo}` - found reference `&fn(u32) -> u32 {bar}` + = note: expected reference `&fn(_) -> _ {foo}` + found reference `&fn(_) -> _ {bar}` = note: different fn items have unique types, even if their signatures are the same = help: consider casting both fn items to fn pointers using `as fn(u32) -> u32` @@ -47,8 +47,8 @@ LL | let c: fn(u32) -> u32 = &foo; | | | expected due to this | - = note: expected fn pointer `fn(u32) -> u32` - found reference `&fn(u32) -> u32 {foo}` + = note: expected fn pointer `fn(_) -> _` + found reference `&fn(_) -> _ {foo}` help: consider removing the reference | LL | let c: fn(u32) -> u32 = foo; @@ -62,8 +62,8 @@ LL | let d: &fn(u32) -> u32 = foo; | | | expected due to this | - = note: expected reference `&fn(u32) -> u32` - found fn item `fn(u32) -> u32 {foo}` + = note: expected reference `&fn(_) -> _` + found fn item `fn(_) -> _ {foo}` help: consider using a reference | LL | let d: &fn(u32) -> u32 = &foo; @@ -77,8 +77,8 @@ LL | let e: &fn(u32) -> u32 = &foo; | | | expected due to this | - = note: expected reference `&fn(u32) -> u32` - found reference `&fn(u32) -> u32 {foo}` + = note: expected reference `&fn(_) -> _` + found reference `&fn(_) -> _ {foo}` = note: fn items are distinct from fn pointers help: consider casting to a fn pointer | diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-2.stderr b/tests/ui/fn/implied-bounds-unnorm-associated-type-2.stderr index 0c3df04ea..e57b5af82 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type-2.stderr +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-2.stderr @@ -13,5 +13,5 @@ LL | f::<'a, 'b>(()); = note: the function `f` is invariant over the parameter `'a` = help: see for more information about variance -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-4.stderr b/tests/ui/fn/implied-bounds-unnorm-associated-type-4.stderr index 4df639232..3be630e2b 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type-4.stderr +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-4.stderr @@ -11,6 +11,6 @@ LL | LL | println!("{}", y); | - borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0505`. diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr b/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr index 3f6401b9f..4662eb32a 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr @@ -16,6 +16,6 @@ help: consider adding an explicit lifetime bound LL | impl<'a, T: 'a> Trait<'a> for T { | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0309`. diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type.stderr b/tests/ui/fn/implied-bounds-unnorm-associated-type.stderr index d417f2883..c2a8fa741 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type.stderr +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type.stderr @@ -11,6 +11,6 @@ LL | LL | println!("{}", y); | - borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0505`. diff --git a/tests/ui/fn/issue-3044.stderr b/tests/ui/fn/issue-3044.stderr index 219029e2a..06254775b 100644 --- a/tests/ui/fn/issue-3044.stderr +++ b/tests/ui/fn/issue-3044.stderr @@ -16,6 +16,6 @@ LL + LL ~ }, /* f */); | -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0061`. diff --git a/tests/ui/fn/issue-3099.stderr b/tests/ui/fn/issue-3099.stderr index 32ee2e1d2..4417f2326 100644 --- a/tests/ui/fn/issue-3099.stderr +++ b/tests/ui/fn/issue-3099.stderr @@ -9,6 +9,6 @@ LL | fn a(x: String, y: String) -> String { | = note: `a` must be defined only once in the value namespace of this module -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0428`. diff --git a/tests/ui/fn/issue-39259.stderr b/tests/ui/fn/issue-39259.stderr index b656b76bf..bd102e581 100644 --- a/tests/ui/fn/issue-39259.stderr +++ b/tests/ui/fn/issue-39259.stderr @@ -10,6 +10,6 @@ help: parenthesized trait syntax expands to `Fn<(u32,), Output=u32>` LL | impl Fn(u32) -> u32 for S { | ^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0229`. diff --git a/tests/ui/fn/signature-error-reporting-under-verbose.stderr b/tests/ui/fn/signature-error-reporting-under-verbose.stderr index 067ee824d..6c6a313c4 100644 --- a/tests/ui/fn/signature-error-reporting-under-verbose.stderr +++ b/tests/ui/fn/signature-error-reporting-under-verbose.stderr @@ -14,6 +14,6 @@ note: function defined here LL | fn needs_ptr(_: fn(i32, u32)) {} | ^^^^^^^^^ --------------- -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3