]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/recursive.stderr
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / ui / consts / recursive.stderr
1 warning: function cannot return without recursing
2   --> $DIR/recursive.rs:3:1
3    |
4 LL | const fn f<T>(x: T) {
5    | ^^^^^^^^^^^^^^^^^^^ cannot return without recursing
6 LL |     f(x);
7    |     ---- recursive call site
8    |
9    = note: `#[warn(unconditional_recursion)]` on by default
10    = help: a `loop` may express intention better if this is on purpose
11
12 error: any use of this value will cause an error
13   --> $DIR/recursive.rs:4:5
14    |
15 LL |     f(x);
16    |     ^^^^
17    |     |
18    |     reached the configured maximum number of stack frames
19    |     inside `f::<i32>` at $DIR/recursive.rs:4:5
20    |     [... 126 additional calls inside `f::<i32>` at $DIR/recursive.rs:4:5 ...]
21    |     inside `X` at $DIR/recursive.rs:9:15
22 ...
23 LL | const X: () = f(1);
24    | -------------------
25    |
26    = note: `#[deny(const_err)]` on by default
27    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
28    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
29
30 error: aborting due to previous error; 1 warning emitted
31