2018-08-20 23:09:15 -07:00
|
|
|
warning: function cannot return without recursing
|
2025-07-13 16:56:31 -04:00
|
|
|
--> $DIR/infinite-function-recursion-error-8727.rs:8:1
|
2018-07-15 14:11:54 -07:00
|
|
|
|
|
|
|
|
|
LL | fn generic<T>() {
|
2018-08-20 23:09:15 -07:00
|
|
|
| ^^^^^^^^^^^^^^^ cannot return without recursing
|
2018-07-15 14:11:54 -07:00
|
|
|
LL | generic::<Option<T>>();
|
|
|
|
|
| ---------------------- recursive call site
|
|
|
|
|
|
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
2022-09-18 19:55:36 +04:00
|
|
|
= note: `#[warn(unconditional_recursion)]` on by default
|
2018-07-15 14:11:54 -07:00
|
|
|
|
2025-07-29 01:13:50 +00:00
|
|
|
error: reached the recursion limit while instantiating `generic::<Option<Option<Option<Option<...>>>>>`
|
2025-07-13 16:56:31 -04:00
|
|
|
--> $DIR/infinite-function-recursion-error-8727.rs:9:5
|
2020-06-21 22:32:35 -04:00
|
|
|
|
|
|
|
|
|
LL | generic::<Option<T>>();
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
note: `generic` defined here
|
2025-07-13 16:56:31 -04:00
|
|
|
--> $DIR/infinite-function-recursion-error-8727.rs:8:1
|
2018-07-15 14:11:54 -07:00
|
|
|
|
|
2020-08-12 17:02:14 -04:00
|
|
|
LL | fn generic<T>() {
|
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2025-07-13 16:56:31 -04:00
|
|
|
= note: the full name for the type has been written to '$TEST_BUILD_DIR/infinite-function-recursion-error-8727.long-type-$LONG_TYPE_HASH.txt'
|
2025-07-29 01:13:50 +00:00
|
|
|
= note: consider using `--verbose` to print the full type name to the console
|
2018-07-15 14:11:54 -07:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error; 1 warning emitted
|
2018-07-15 14:11:54 -07:00
|
|
|
|