mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
13 lines
463 B
Text
13 lines
463 B
Text
warning: function cannot return without recursing
|
|
--> $DIR/issue-85031-2.rs:12:5
|
|
|
|
|
LL | pub fn foo<const A: usize>() -> [(); A - 0] {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
|
|
LL | Self::foo()
|
|
| ----------- recursive call site
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
= note: `#[warn(unconditional_recursion)]` on by default
|
|
|
|
warning: 1 warning emitted
|
|
|