diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/regions/region-bound-on-closure-outlives-call.stderr | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/regions/region-bound-on-closure-outlives-call.stderr')
-rw-r--r-- | tests/ui/regions/region-bound-on-closure-outlives-call.stderr | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ui/regions/region-bound-on-closure-outlives-call.stderr b/tests/ui/regions/region-bound-on-closure-outlives-call.stderr new file mode 100644 index 000000000..ea43dde11 --- /dev/null +++ b/tests/ui/regions/region-bound-on-closure-outlives-call.stderr @@ -0,0 +1,24 @@ +warning: function cannot return without recursing + --> $DIR/region-bound-on-closure-outlives-call.rs:1:1 + | +LL | fn call_rec<F>(mut f: F) -> usize where F: FnMut(usize) -> usize { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing +LL | +LL | (|x| f(x))(call_rec(f)) + | ----------- recursive call site + | + = help: a `loop` may express intention better if this is on purpose + = note: `#[warn(unconditional_recursion)]` on by default + +error[E0505]: cannot move out of `f` because it is borrowed + --> $DIR/region-bound-on-closure-outlives-call.rs:3:25 + | +LL | (|x| f(x))(call_rec(f)) + | --- - ^ move out of `f` occurs here + | | | + | | borrow occurs due to use in closure + | borrow of `f` occurs here + +error: aborting due to previous error; 1 warning emitted + +For more information about this error, try `rustc --explain E0505`. |