diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/ui/fn | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/fn')
-rw-r--r-- | tests/ui/fn/fn-trait-formatting.rs | 2 | ||||
-rw-r--r-- | tests/ui/fn/fn-trait-formatting.stderr | 4 | ||||
-rw-r--r-- | tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/tests/ui/fn/fn-trait-formatting.rs b/tests/ui/fn/fn-trait-formatting.rs index 636ac7107..61a8791ab 100644 --- a/tests/ui/fn/fn-trait-formatting.rs +++ b/tests/ui/fn/fn-trait-formatting.rs @@ -17,5 +17,5 @@ fn main() { //~| found struct `Box<dyn FnMut() -> isize>` needs_fn(1); - //~^ ERROR expected a `Fn<(isize,)>` closure, found `{integer}` + //~^ ERROR expected a `Fn(isize)` closure, found `{integer}` } diff --git a/tests/ui/fn/fn-trait-formatting.stderr b/tests/ui/fn/fn-trait-formatting.stderr index 45d543bda..c5e2f4169 100644 --- a/tests/ui/fn/fn-trait-formatting.stderr +++ b/tests/ui/fn/fn-trait-formatting.stderr @@ -39,11 +39,11 @@ LL | let _: () = Box::new(|| -> isize { unimplemented!() }) as Box<dyn FnMut = note: expected unit type `()` found struct `Box<dyn FnMut() -> isize>` -error[E0277]: expected a `Fn<(isize,)>` closure, found `{integer}` +error[E0277]: expected a `Fn(isize)` closure, found `{integer}` --> $DIR/fn-trait-formatting.rs:19:14 | LL | needs_fn(1); - | -------- ^ expected an `Fn<(isize,)>` closure, found `{integer}` + | -------- ^ expected an `Fn(isize)` closure, found `{integer}` | | | required by a bound introduced by this call | 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 458756a3d..3f6401b9f 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr @@ -2,14 +2,16 @@ error[E0309]: the parameter type `T` may not live long enough --> $DIR/implied-bounds-unnorm-associated-type-5.rs:6:13 | LL | impl<'a, T> Trait<'a> for T { - | ^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds... + | -- ^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds... + | | + | the parameter type `T` must be valid for the lifetime `'a` as defined here... | note: ...that is required by this bound --> $DIR/implied-bounds-unnorm-associated-type-5.rs:1:18 | LL | trait Trait<'a>: 'a { | ^^ -help: consider adding an explicit lifetime bound... +help: consider adding an explicit lifetime bound | LL | impl<'a, T: 'a> Trait<'a> for T { | ++++ |