summaryrefslogtreecommitdiffstats
path: root/tests/ui/anonymous-higher-ranked-lifetime.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/anonymous-higher-ranked-lifetime.stderr
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/anonymous-higher-ranked-lifetime.stderr')
-rw-r--r--tests/ui/anonymous-higher-ranked-lifetime.stderr223
1 files changed, 223 insertions, 0 deletions
diff --git a/tests/ui/anonymous-higher-ranked-lifetime.stderr b/tests/ui/anonymous-higher-ranked-lifetime.stderr
new file mode 100644
index 000000000..c023d1b15
--- /dev/null
+++ b/tests/ui/anonymous-higher-ranked-lifetime.stderr
@@ -0,0 +1,223 @@
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5
+ |
+LL | f1(|_: (), _: ()| {});
+ | ^^ -------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'a, 'b> fn(&'a (), &'b ()) -> _`
+ found closure signature `fn((), ()) -> _`
+note: required by a bound in `f1`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:16:25
+ |
+LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
+ | ^^^^^^^^^^^^ required by this bound in `f1`
+help: consider borrowing the argument
+ |
+LL | f1(|_: &(), _: &()| {});
+ | + +
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:3:5
+ |
+LL | f2(|_: (), _: ()| {});
+ | ^^ -------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'a, 'b> fn(&'a (), &'b ()) -> _`
+ found closure signature `fn((), ()) -> _`
+note: required by a bound in `f2`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:17:25
+ |
+LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f2`
+help: consider borrowing the argument
+ |
+LL | f2(|_: &(), _: &()| {});
+ | + +
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
+ |
+LL | f3(|_: (), _: ()| {});
+ | ^^ -------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'a> fn(&(), &'a ()) -> _`
+ found closure signature `fn((), ()) -> _`
+note: required by a bound in `f3`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:18:29
+ |
+LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
+ | ^^^^^^^^^^^^^^^ required by this bound in `f3`
+help: consider borrowing the argument
+ |
+LL | f3(|_: &(), _: &()| {});
+ | + +
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:5:5
+ |
+LL | f4(|_: (), _: ()| {});
+ | ^^ -------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'r, 'a> fn(&'a (), &'r ()) -> _`
+ found closure signature `fn((), ()) -> _`
+note: required by a bound in `f4`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:19:25
+ |
+LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f4`
+help: consider borrowing the argument
+ |
+LL | f4(|_: &(), _: &()| {});
+ | + +
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
+ |
+LL | f5(|_: (), _: ()| {});
+ | ^^ -------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'r> fn(&'r (), &'r ()) -> _`
+ found closure signature `fn((), ()) -> _`
+note: required by a bound in `f5`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:20:25
+ |
+LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f5`
+help: consider borrowing the argument
+ |
+LL | f5(|_: &(), _: &()| {});
+ | + +
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:7:5
+ |
+LL | g1(|_: (), _: ()| {});
+ | ^^ -------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'a> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>) -> _`
+ found closure signature `fn((), ()) -> _`
+note: required by a bound in `g1`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:23:25
+ |
+LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g1`
+help: consider borrowing the argument
+ |
+LL | g1(|_: &(), _: ()| {});
+ | +
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
+ |
+LL | g2(|_: (), _: ()| {});
+ | ^^ -------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'a> fn(&'a (), for<'a> fn(&'a ())) -> _`
+ found closure signature `fn((), ()) -> _`
+note: required by a bound in `g2`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:24:25
+ |
+LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
+ | ^^^^^^^^^^^^^^^^ required by this bound in `g2`
+help: consider borrowing the argument
+ |
+LL | g2(|_: &(), _: ()| {});
+ | +
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:9:5
+ |
+LL | g3(|_: (), _: ()| {});
+ | ^^ -------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'s> fn(&'s (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>) -> _`
+ found closure signature `fn((), ()) -> _`
+note: required by a bound in `g3`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:25:25
+ |
+LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g3`
+help: consider borrowing the argument
+ |
+LL | g3(|_: &(), _: ()| {});
+ | +
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
+ |
+LL | g4(|_: (), _: ()| {});
+ | ^^ -------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'a> fn(&'a (), for<'r> fn(&'r ())) -> _`
+ found closure signature `fn((), ()) -> _`
+note: required by a bound in `g4`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:26:25
+ |
+LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g4`
+help: consider borrowing the argument
+ |
+LL | g4(|_: &(), _: ()| {});
+ | +
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:11:5
+ |
+LL | h1(|_: (), _: (), _: (), _: ()| {});
+ | ^^ ---------------------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'a, 'b> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>, &'b (), for<'a, 'b> fn(&'a (), &'b ())) -> _`
+ found closure signature `fn((), (), (), ()) -> _`
+note: required by a bound in `h1`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:29:25
+ |
+LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h1`
+help: consider borrowing the argument
+ |
+LL | h1(|_: &(), _: (), _: &(), _: ()| {});
+ | + +
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
+ |
+LL | h2(|_: (), _: (), _: (), _: ()| {});
+ | ^^ ---------------------------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `for<'t0, 'a> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>, &'t0 (), for<'a, 'b> fn(&'a (), &'b ())) -> _`
+ found closure signature `fn((), (), (), ()) -> _`
+note: required by a bound in `h2`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:30:25
+ |
+LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h2`
+help: consider borrowing the argument
+ |
+LL | h2(|_: &(), _: (), _: &(), _: ()| {});
+ | + +
+
+error: aborting due to 11 previous errors
+
+For more information about this error, try `rustc --explain E0631`.