From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../ui/anonymous-higher-ranked-lifetime.stderr | 179 +++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 src/test/ui/anonymous-higher-ranked-lifetime.stderr (limited to 'src/test/ui/anonymous-higher-ranked-lifetime.stderr') diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.stderr b/src/test/ui/anonymous-higher-ranked-lifetime.stderr new file mode 100644 index 000000000..1a0a5fdf4 --- /dev/null +++ b/src/test/ui/anonymous-higher-ranked-lifetime.stderr @@ -0,0 +1,179 @@ +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<'r, 's> fn(&'r (), &'s ()) -> _` + found closure signature `fn((), ()) -> _` +note: required by a bound in `f1` + --> $DIR/anonymous-higher-ranked-lifetime.rs:16:25 + | +LL | fn f1(_: F) where F: Fn(&(), &()) {} + | ^^^^^^^^^^^^ required by this bound in `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, 'r> fn(&'a (), &'r ()) -> _` + found closure signature `fn((), ()) -> _` +note: required by a bound in `f2` + --> $DIR/anonymous-higher-ranked-lifetime.rs:17:25 + | +LL | fn f2(_: F) where F: for<'a> Fn(&'a (), &()) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `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<'r> fn(&(), &'r ()) -> _` + 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` + +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, 's> fn(&'s (), &'r ()) -> _` + found closure signature `fn((), ()) -> _` +note: required by a bound in `f4` + --> $DIR/anonymous-higher-ranked-lifetime.rs:19:25 + | +LL | fn f4(_: F) where F: for<'r> Fn(&(), &'r ()) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `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) where F: for<'r> Fn(&'r (), &'r ()) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `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<'r> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>) -> _` + found closure signature `fn((), ()) -> _` +note: required by a bound in `g1` + --> $DIR/anonymous-higher-ranked-lifetime.rs:23:25 + | +LL | fn g1(_: F) where F: Fn(&(), Box) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `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<'r> fn(&'r (), for<'r> fn(&'r ())) -> _` + found closure signature `fn((), ()) -> _` +note: required by a bound in `g2` + --> $DIR/anonymous-higher-ranked-lifetime.rs:24:25 + | +LL | fn g2(_: F) where F: Fn(&(), fn(&())) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `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<'r> Fn(&'r ()) + 'static)>) -> _` + found closure signature `fn((), ()) -> _` +note: required by a bound in `g3` + --> $DIR/anonymous-higher-ranked-lifetime.rs:25:25 + | +LL | fn g3(_: F) where F: for<'s> Fn(&'s (), Box) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `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<'s> fn(&'s (), 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) where F: Fn(&(), for<'r> fn(&'r ())) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `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<'r, 's> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>, &'s (), for<'r, 's> fn(&'r (), &'s ())) -> _` + found closure signature `fn((), (), (), ()) -> _` +note: required by a bound in `h1` + --> $DIR/anonymous-higher-ranked-lifetime.rs:29:25 + | +LL | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `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, 'r> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _` + found closure signature `fn((), (), (), ()) -> _` +note: required by a bound in `h2` + --> $DIR/anonymous-higher-ranked-lifetime.rs:30:25 + | +LL | fn h2(_: F) where F: for<'t0> Fn(&(), Box, &'t0 (), fn(&(), &())) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h2` + +error: aborting due to 11 previous errors + +For more information about this error, try `rustc --explain E0631`. -- cgit v1.2.3