fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: function cannot return without recursing 2 --> $DIR/lint-unconditional-recursion.rs:4:1 3 | 4LL | fn foo() { 5 | ^^^^^^^^ cannot return without recursing 6LL | foo(); 7 | ----- recursive call site 8 | 9 = help: a `loop` may express intention better if this is on purpose 10note: the lint level is defined here 11 --> $DIR/lint-unconditional-recursion.rs:1:9 12 | 13LL | #![deny(unconditional_recursion)] 14 | ^^^^^^^^^^^^^^^^^^^^^^^ 15 16error: function cannot return without recursing 17 --> $DIR/lint-unconditional-recursion.rs:14:1 18 | 19LL | fn baz() { 20 | ^^^^^^^^ cannot return without recursing 21LL | if true { 22LL | baz() 23 | ----- recursive call site 24LL | } else { 25LL | baz() 26 | ----- recursive call site 27 | 28 = help: a `loop` may express intention better if this is on purpose 29 30error: function cannot return without recursing 31 --> $DIR/lint-unconditional-recursion.rs:26:1 32 | 33LL | fn quz() -> bool { 34 | ^^^^^^^^^^^^^^^^ cannot return without recursing 35LL | if true { 36LL | while quz() {} 37 | ----- recursive call site 38... 39LL | loop { quz(); } 40 | ----- recursive call site 41 | 42 = help: a `loop` may express intention better if this is on purpose 43 44error: function cannot return without recursing 45 --> $DIR/lint-unconditional-recursion.rs:37:5 46 | 47LL | fn bar(&self) { 48 | ^^^^^^^^^^^^^ cannot return without recursing 49LL | self.bar() 50 | ---------- recursive call site 51 | 52 = help: a `loop` may express intention better if this is on purpose 53 54error: function cannot return without recursing 55 --> $DIR/lint-unconditional-recursion.rs:43:5 56 | 57LL | fn bar(&self) { 58 | ^^^^^^^^^^^^^ cannot return without recursing 59LL | loop { 60LL | self.bar() 61 | ---------- recursive call site 62 | 63 = help: a `loop` may express intention better if this is on purpose 64 65error: function cannot return without recursing 66 --> $DIR/lint-unconditional-recursion.rs:52:5 67 | 68LL | fn bar(&self) { 69 | ^^^^^^^^^^^^^ cannot return without recursing 70LL | 0.bar() 71 | ------- recursive call site 72 | 73 = help: a `loop` may express intention better if this is on purpose 74 75error: function cannot return without recursing 76 --> $DIR/lint-unconditional-recursion.rs:65:5 77 | 78LL | fn bar(&self) { 79 | ^^^^^^^^^^^^^ cannot return without recursing 80LL | Foo2::bar(self) 81 | --------------- recursive call site 82 | 83 = help: a `loop` may express intention better if this is on purpose 84 85error: function cannot return without recursing 86 --> $DIR/lint-unconditional-recursion.rs:71:5 87 | 88LL | fn bar(&self) { 89 | ^^^^^^^^^^^^^ cannot return without recursing 90LL | loop { 91LL | Foo2::bar(self) 92 | --------------- recursive call site 93 | 94 = help: a `loop` may express intention better if this is on purpose 95 96error: function cannot return without recursing 97 --> $DIR/lint-unconditional-recursion.rs:81:5 98 | 99LL | fn qux(&self) { 100 | ^^^^^^^^^^^^^ cannot return without recursing 101LL | self.qux(); 102 | ---------- recursive call site 103 | 104 = help: a `loop` may express intention better if this is on purpose 105 106error: function cannot return without recursing 107 --> $DIR/lint-unconditional-recursion.rs:86:5 108 | 109LL | fn as_ref(&self) -> &Self { 110 | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 111LL | Baz::as_ref(self) 112 | ----------------- recursive call site 113 | 114 = help: a `loop` may express intention better if this is on purpose 115 116error: function cannot return without recursing 117 --> $DIR/lint-unconditional-recursion.rs:93:5 118 | 119LL | fn default() -> Baz { 120 | ^^^^^^^^^^^^^^^^^^^ cannot return without recursing 121LL | let x = Default::default(); 122 | ------------------ recursive call site 123 | 124 = help: a `loop` may express intention better if this is on purpose 125 126error: function cannot return without recursing 127 --> $DIR/lint-unconditional-recursion.rs:102:5 128 | 129LL | fn deref(&self) -> &() { 130 | ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 131LL | &**self 132 | ------ recursive call site 133 | 134 = help: a `loop` may express intention better if this is on purpose 135 136error: function cannot return without recursing 137 --> $DIR/lint-unconditional-recursion.rs:109:5 138 | 139LL | fn index(&self, x: usize) -> &Baz { 140 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 141LL | &self[x] 142 | --- recursive call site 143 | 144 = help: a `loop` may express intention better if this is on purpose 145 146error: function cannot return without recursing 147 --> $DIR/lint-unconditional-recursion.rs:118:5 148 | 149LL | fn deref(&self) -> &Baz { 150 | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 151LL | self.as_ref() 152 | ------------- recursive call site 153 | 154 = help: a `loop` may express intention better if this is on purpose 155 156error: function cannot return without recursing 157 --> $DIR/lint-unconditional-recursion.rs:162:1 158 | 159LL | pub fn drop_and_replace(mut a: Option<String>) { 160 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 161LL | a = None; 162LL | drop_and_replace(a); 163 | ------------------- recursive call site 164 | 165 = help: a `loop` may express intention better if this is on purpose 166 167error: function cannot return without recursing 168 --> $DIR/lint-unconditional-recursion.rs:168:1 169 | 170LL | pub fn call() -> String { 171 | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 172LL | let s = String::new(); 173LL | call(); 174 | ------ recursive call site 175 | 176 = help: a `loop` may express intention better if this is on purpose 177 178error: function cannot return without recursing 179 --> $DIR/lint-unconditional-recursion.rs:175:1 180 | 181LL | pub fn overflow_check(a: i32, b: i32) { 182 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 183LL | let _ = a + b; 184LL | overflow_check(a, b); 185 | -------------------- recursive call site 186 | 187 = help: a `loop` may express intention better if this is on purpose 188 189error: function cannot return without recursing 190 --> $DIR/lint-unconditional-recursion.rs:186:5 191 | 192LL | fn default() -> Self { 193 | ^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 194... 195LL | ..Default::default() 196 | ------------------ recursive call site 197 | 198 = help: a `loop` may express intention better if this is on purpose 199 200error: aborting due to 18 previous errors 201