summaryrefslogtreecommitdiffstats
path: root/tests/ui/fn
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
commit018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch)
treea835ebdf2088ef88fa681f8fad45f09922c1ae9a /tests/ui/fn
parentAdding debian version 1.75.0+dfsg1-5. (diff)
downloadrustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz
rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/fn')
-rw-r--r--tests/ui/fn/bad-main.stderr2
-rw-r--r--tests/ui/fn/fn-bad-block-type.stderr2
-rw-r--r--tests/ui/fn/fn-closure-mutable-capture.stderr2
-rw-r--r--tests/ui/fn/fn-pointer-mismatch.rs12
-rw-r--r--tests/ui/fn/fn-pointer-mismatch.stderr16
-rw-r--r--tests/ui/fn/implied-bounds-unnorm-associated-type-2.stderr2
-rw-r--r--tests/ui/fn/implied-bounds-unnorm-associated-type-4.stderr2
-rw-r--r--tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr2
-rw-r--r--tests/ui/fn/implied-bounds-unnorm-associated-type.stderr2
-rw-r--r--tests/ui/fn/issue-3044.stderr2
-rw-r--r--tests/ui/fn/issue-3099.stderr2
-rw-r--r--tests/ui/fn/issue-39259.stderr2
-rw-r--r--tests/ui/fn/signature-error-reporting-under-verbose.stderr2
13 files changed, 25 insertions, 25 deletions
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 <https://doc.rust-lang.org/nomicon/subtyping.html> 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`.