summary refs log tree commit diff
path: root/src/test/ui/lint-unconditional-recursion.stderr
blob: f6f97654b57fd5709b9c764fa27ebb18bd4909ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:14:1
   |
14 | fn foo() { //~ ERROR function cannot return without recurring
   | ^^^^^^^^ cannot return without recurring
15 |     foo();
   |     ----- recursive call site
   |
note: lint level defined here
  --> $DIR/lint-unconditional-recursion.rs:11:9
   |
11 | #![deny(unconditional_recursion)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:24:1
   |
24 | fn baz() { //~ ERROR function cannot return without recurring
   | ^^^^^^^^ cannot return without recurring
25 |     if true {
26 |         baz()
   |         ----- recursive call site
27 |     } else {
28 |         baz()
   |         ----- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:36:1
   |
36 | fn quz() -> bool { //~ ERROR function cannot return without recurring
   | ^^^^^^^^^^^^^^^^ cannot return without recurring
37 |     if true {
38 |         while quz() {}
   |               ----- recursive call site
...
41 |         loop { quz(); }
   |                ----- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:47:5
   |
47 |     fn bar(&self) { //~ ERROR function cannot return without recurring
   |     ^^^^^^^^^^^^^ cannot return without recurring
48 |         self.bar()
   |         ---------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:53:5
   |
53 |     fn bar(&self) { //~ ERROR function cannot return without recurring
   |     ^^^^^^^^^^^^^ cannot return without recurring
54 |         loop {
55 |             self.bar()
   |             ---------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:62:5
   |
62 |     fn bar(&self) { //~ ERROR function cannot return without recurring
   |     ^^^^^^^^^^^^^ cannot return without recurring
63 |         0.bar()
   |         ------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:75:5
   |
75 |     fn bar(&self) { //~ ERROR function cannot return without recurring
   |     ^^^^^^^^^^^^^ cannot return without recurring
76 |         Foo2::bar(self)
   |         --------------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:81:5
   |
81 |     fn bar(&self) { //~ ERROR function cannot return without recurring
   |     ^^^^^^^^^^^^^ cannot return without recurring
82 |         loop {
83 |             Foo2::bar(self)
   |             --------------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:91:5
   |
91 |     fn qux(&self) { //~ ERROR function cannot return without recurring
   |     ^^^^^^^^^^^^^ cannot return without recurring
92 |         self.qux();
   |         ---------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
  --> $DIR/lint-unconditional-recursion.rs:96:5
   |
96 |     fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recurring
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
97 |         Baz::as_ref(self)
   |         ----------------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
   --> $DIR/lint-unconditional-recursion.rs:103:5
    |
103 |     fn default() -> Baz { //~ ERROR function cannot return without recurring
    |     ^^^^^^^^^^^^^^^^^^^ cannot return without recurring
104 |         let x = Default::default();
    |                 ------------------ recursive call site
    |
    = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
   --> $DIR/lint-unconditional-recursion.rs:112:5
    |
112 |     fn deref(&self) -> &() { //~ ERROR function cannot return without recurring
    |     ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
113 |         &**self
    |          ------ recursive call site
    |
    = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
   --> $DIR/lint-unconditional-recursion.rs:119:5
    |
119 |     fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recurring
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
120 |         &self[x]
    |          ------- recursive call site
    |
    = help: a `loop` may express intention better if this is on purpose

error: function cannot return without recurring
   --> $DIR/lint-unconditional-recursion.rs:128:5
    |
128 |     fn deref(&self) -> &Baz { //~ ERROR function cannot return without recurring
    |     ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
129 |         self.as_ref()
    |         ---- recursive call site
    |
    = help: a `loop` may express intention better if this is on purpose

error: aborting due to 14 previous errors