2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:4:1
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn foo() {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^ cannot return without recursing
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | foo();
|
2017-12-18 07:46:55 +00:00
|
|
|
| ----- recursive call site
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:1:9
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | #![deny(unconditional_recursion)]
|
2017-12-10 19:47:55 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:14:1
|
2017-12-10 20:29:24 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn baz() {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^ cannot return without recursing
|
2018-02-24 23:01:39 +00:00
|
|
|
LL | if true {
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | baz()
|
2017-12-18 07:46:55 +00:00
|
|
|
| ----- recursive call site
|
2018-02-24 23:01:39 +00:00
|
|
|
LL | } else {
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | baz()
|
2017-12-18 07:46:55 +00:00
|
|
|
| ----- recursive call site
|
|
|
|
|
|
2017-12-10 19:47:55 +00:00
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:26:1
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn quz() -> bool {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-24 23:01:39 +00:00
|
|
|
LL | if true {
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | while quz() {}
|
2017-12-18 07:46:55 +00:00
|
|
|
| ----- recursive call site
|
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | loop { quz(); }
|
2017-12-18 07:46:55 +00:00
|
|
|
| ----- recursive call site
|
|
|
|
|
|
2017-12-10 19:47:55 +00:00
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:37:5
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn bar(&self) {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | self.bar()
|
2017-12-18 07:46:55 +00:00
|
|
|
| ---------- recursive call site
|
|
|
|
|
|
2017-12-10 19:47:55 +00:00
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:43:5
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn bar(&self) {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-24 23:01:39 +00:00
|
|
|
LL | loop {
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | self.bar()
|
2017-12-18 07:46:55 +00:00
|
|
|
| ---------- recursive call site
|
|
|
|
|
|
2017-12-10 19:47:55 +00:00
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:52:5
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn bar(&self) {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | 0.bar()
|
2017-12-18 07:46:55 +00:00
|
|
|
| ------- recursive call site
|
|
|
|
|
|
2017-12-10 19:47:55 +00:00
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:65:5
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn bar(&self) {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | Foo2::bar(self)
|
2017-12-18 07:46:55 +00:00
|
|
|
| --------------- recursive call site
|
|
|
|
|
|
2017-12-10 19:47:55 +00:00
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:71:5
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn bar(&self) {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-24 23:01:39 +00:00
|
|
|
LL | loop {
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | Foo2::bar(self)
|
2017-12-18 07:46:55 +00:00
|
|
|
| --------------- recursive call site
|
|
|
|
|
|
2017-12-10 19:47:55 +00:00
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:81:5
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn qux(&self) {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | self.qux();
|
2017-12-18 07:46:55 +00:00
|
|
|
| ---------- recursive call site
|
|
|
|
|
|
2017-12-10 19:47:55 +00:00
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:86:5
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn as_ref(&self) -> &Self {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | Baz::as_ref(self)
|
2017-12-18 07:46:55 +00:00
|
|
|
| ----------------- recursive call site
|
|
|
|
|
|
2017-12-10 19:47:55 +00:00
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:93:5
|
2018-02-23 00:42:32 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn default() -> Baz {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | let x = Default::default();
|
|
|
|
| ------------------ recursive call site
|
|
|
|
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
2017-12-10 19:47:55 +00:00
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:102:5
|
2018-02-23 00:42:32 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn deref(&self) -> &() {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | &**self
|
|
|
|
| ------ recursive call site
|
|
|
|
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
2017-12-10 19:47:55 +00:00
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:109:5
|
2018-02-23 00:42:32 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn index(&self, x: usize) -> &Baz {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | &self[x]
|
|
|
|
| ------- recursive call site
|
|
|
|
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
2017-12-10 19:47:55 +00:00
|
|
|
|
2018-08-21 06:09:15 +00:00
|
|
|
error: function cannot return without recursing
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lint-unconditional-recursion.rs:118:5
|
2018-02-23 00:42:32 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | fn deref(&self) -> &Baz {
|
2018-08-21 06:09:15 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | self.as_ref()
|
|
|
|
| ---- recursive call site
|
|
|
|
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
|
|
error: aborting due to 14 previous errors
|
|
|
|
|