]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/recursive.stderr
Rollup merge of #107004 - compiler-errors:new-solver-new-candidates-2, r=lcnr
[rust.git] / tests / 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    = help: a `loop` may express intention better if this is on purpose
10    = note: `#[warn(unconditional_recursion)]` on by default
11
12 error[E0080]: evaluation of constant value failed
13   --> $DIR/recursive.rs:4:5
14    |
15 LL |     f(x);
16    |     ^^^^ reached the configured maximum number of stack frames
17    |
18 note: inside `f::<i32>`
19   --> $DIR/recursive.rs:4:5
20    |
21 LL |     f(x);
22    |     ^^^^
23 note: [... 126 additional calls inside `f::<i32>` ...]
24   --> $DIR/recursive.rs:4:5
25    |
26 LL |     f(x);
27    |     ^^^^
28 note: inside `X`
29   --> $DIR/recursive.rs:8:15
30    |
31 LL | const X: () = f(1);
32    |               ^^^^
33
34 error: aborting due to previous error; 1 warning emitted
35
36 For more information about this error, try `rustc --explain E0080`.