-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexceptions.ll
More file actions
1850 lines (1615 loc) · 61.1 KB
/
exceptions.ll
File metadata and controls
1850 lines (1615 loc) · 61.1 KB
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
warning: unused import: `std::collections::HashMap`
--> crates/common/src/error_codes.rs:12:5
|
12 | use std::collections::HashMap;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: variable does not need to be mutable
--> crates/common/src/interner.rs:23:13
|
23 | let mut interner = Self {
| ----^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: unused import: `Ident`
--> crates/ast/src/macros.rs:5:40
|
5 | use crate::{Decorator, Expr, ExprKind, Ident, Keyword};
| ^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `roast_common::Symbol`
--> crates/typer/src/builtins.rs:4:5
|
4 | use roast_common::Symbol;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `roast_common::Symbol`
--> crates/typer/src/ownership.rs:7:5
|
7 | use roast_common::Symbol;
| ^^^^^^^^^^^^^^^^^^^^
warning: unused import: `std::sync::Arc`
--> crates/typer/src/ownership.rs:9:5
|
9 | use std::sync::Arc;
| ^^^^^^^^^^^^^^
warning: unused import: `ClassType`
--> crates/typer/src/mro.rs:6:26
|
6 | use crate::types::{Type, ClassType};
| ^^^^^^^^^
warning: unused import: `roast_common::prelude::*`
--> crates/typer/src/lib.rs:27:5
|
27 | use roast_common::prelude::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: unreachable pattern
--> crates/typer/src/infer.rs:67:9
|
44 | (t, Type::Optional(inner)) => unify(ctx, t, inner),
| -------------------------- matches all the relevant values
...
67 | (Type::Optional(a), Type::Optional(b)) => unify(ctx, a, b),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no value can reach this
|
= note: `#[warn(unreachable_patterns)]` on by default
warning: unreachable pattern
--> crates/typer/src/checker.rs:1239:56
|
1146 | ... PatternKind::MatchValue { value } => {
| --------------------------------- matches all the relevant values
...
1239 | ... PatternKind::MatchSingleton { value: _ } | PatternKind::MatchValue { value: _ } if matches!(subject_type, Type::O...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no value can reach this
warning: unused variable: `cls`
--> crates/typer/src/ownership.rs:329:25
|
329 | Type::Class(cls) => {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cls`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `keys`
--> crates/typer/src/exhaustiveness.rs:198:41
|
198 | PatternKind::MatchMapping { keys, patterns, rest } => {
| ^^^^ help: try ignoring the field: `keys: _`
warning: unused variable: `rest`
--> crates/typer/src/exhaustiveness.rs:198:57
|
198 | PatternKind::MatchMapping { keys, patterns, rest } => {
| ^^^^ help: try ignoring the field: `rest: _`
warning: unused variable: `arity`
--> crates/typer/src/exhaustiveness.rs:300:13
|
300 | let arity = ctor.arity();
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_arity`
warning: unused variable: `n1`
--> crates/typer/src/exhaustiveness.rs:378:35
|
378 | (Constructor::ListAtLeast(n1), Constructor::ListAtLeast(n2)) => true,
| ^^ help: if this is intentional, prefix it with an underscore: `_n1`
warning: unused variable: `n2`
--> crates/typer/src/exhaustiveness.rs:378:65
|
378 | (Constructor::ListAtLeast(n1), Constructor::ListAtLeast(n2)) => true,
| ^^ help: if this is intentional, prefix it with an underscore: `_n2`
warning: unused variable: `cls`
--> crates/typer/src/exhaustiveness.rs:487:21
|
487 | Type::Class(cls) => {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cls`
warning: unused variable: `sub_witness`
--> crates/typer/src/exhaustiveness.rs:606:29
|
606 | if let Some(sub_witness) = compute_usefulness(&specialized, &witness_fields, ty) {
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sub_witness`
warning: unused variable: `sub_witness`
--> crates/typer/src/exhaustiveness.rs:621:29
|
621 | if let Some(sub_witness) = compute_usefulness(&specialized, &witness_fields, ty) {
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sub_witness`
warning: unused variable: `has_guard`
--> crates/typer/src/exhaustiveness.rs:648:13
|
648 | let mut has_guard = false;
| ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_has_guard`
warning: variable does not need to be mutable
--> crates/typer/src/exhaustiveness.rs:648:9
|
648 | let mut has_guard = false;
| ----^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: method `is_exhaustive` is never used
--> crates/typer/src/exhaustiveness.rs:475:8
|
403 | impl ConstructorSet {
| ------------------- method in this implementation
...
475 | fn is_exhaustive(&self, covered: &[Constructor]) -> bool {
| ^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: unused import: `Symbol`
--> crates/parser/src/parser.rs:5:76
|
5 | use roast_common::{Diagnostic, DiagnosticSink, Interner, SourceFile, Span, Symbol};
| ^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: value assigned to `closed` is never read
--> crates/parser/src/lexer.rs:445:17
|
445 | let mut closed = false;
| ^^^^^^
|
= help: maybe it is overwritten before being read?
= note: `#[warn(unused_assignments)]` on by default
warning: unused variable: `c`
--> crates/parser/src/lexer.rs:510:34
|
510 | ... Some(c) => {
| ^ help: if this is intentional, prefix it with an underscore: `_c`
|
= note: `#[warn(unused_variables)]` on by default
warning: variable `seen_double_star` is assigned to, but never used
--> crates/parser/src/parser.rs:344:17
|
344 | let mut seen_double_star = false;
| ^^^^^^^^^^^^^^^^
|
= note: consider using `_seen_double_star` instead
warning: value assigned to `seen_double_star` is never read
--> crates/parser/src/parser.rs:361:17
|
361 | seen_double_star = true;
| ^^^^^^^^^^^^^^^^
|
= help: maybe it is overwritten before being read?
warning: variable `seen_double_star` is assigned to, but never used
--> crates/parser/src/parser.rs:398:17
|
398 | let mut seen_double_star = false;
| ^^^^^^^^^^^^^^^^
|
= note: consider using `_seen_double_star` instead
warning: value assigned to `seen_double_star` is never read
--> crates/parser/src/parser.rs:416:17
|
416 | seen_double_star = true;
| ^^^^^^^^^^^^^^^^
|
= help: maybe it is overwritten before being read?
warning: variable does not need to be mutable
--> crates/parser/src/parser.rs:2504:13
|
2504 | let mut lexer = Lexer::new(&temp_source, self.interner);
| ----^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: unused variable: `kw`
--> crates/parser/src/token.rs:22:30
|
22 | pub fn is_keyword(&self, kw: &str) -> bool {
| ^^ help: if this is intentional, prefix it with an underscore: `_kw`
warning: field `source` is never read
--> crates/parser/src/lexer.rs:12:5
|
11 | pub struct Lexer<'src> {
| ----- field in this struct
12 | source: &'src str,
| ^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: method `at_any` is never used
--> crates/parser/src/parser.rs:82:8
|
45 | impl<'a> Parser<'a> {
| ------------------- method in this implementation
...
82 | fn at_any(&self, kinds: &[TokenKind]) -> bool {
| ^^^^^^
warning: unused import: `roast_common::prelude::*`
--> crates/hir/src/lib.rs:11:5
|
11 | use roast_common::prelude::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused variable: `concrete_methods`
--> crates/hir/src/build.rs:1723:13
|
1723 | let concrete_methods: std::collections::HashSet<String> = members.iter()
| ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_concrete_methods`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `id`
--> crates/hir/src/build.rs:1937:41
|
1937 | if let ExprKind::Name { id, .. } = &target.kind {
| ^^-
| |
| help: try removing the field
warning: unused import: `id_arena::Id`
--> crates/mir/src/nodes.rs:3:5
|
3 | use id_arena::Id;
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unreachable pattern
--> crates/mir/src/build.rs:686:13
|
686 | _ => {}
| ^ no value can reach this
|
note: multiple earlier patterns match some of the same values
--> crates/mir/src/build.rs:686:13
|
246 | HirStmtKind::Let { name, ty, init, mutable } => {
| -------------------------------------------- matches some of the same values
...
301 | HirStmtKind::Assign { target, value } => {
| ------------------------------------- matches some of the same values
...
384 | HirStmtKind::Expr(expr_id) => {
| -------------------------- matches some of the same values
...
389 | HirStmtKind::Return(expr) => {
| ------------------------- matches some of the same values
...
686 | _ => {}
| ^ ...and 10 other patterns collectively make this unreachable
= note: `#[warn(unreachable_patterns)]` on by default
warning: unused variable: `i`
--> crates/mir/src/build.rs:858:14
|
858 | for (i, arm) in arms.iter().enumerate() {
| ^ help: if this is intentional, prefix it with an underscore: `_i`
|
= note: `#[warn(unused_variables)]` on by default
warning: unreachable pattern
--> crates/mir/src/build.rs:1331:21
|
1331 | _ => MirBinOp::Add, // Fallback for Is/IsNot
| ^ no value can reach this
|
note: multiple earlier patterns match some of the same values
--> crates/mir/src/build.rs:1331:21
|
1302 | HirBinOp::Add => MirBinOp::Add,
| ------------- matches some of the same values
1303 | HirBinOp::Sub => MirBinOp::Sub,
| ------------- matches some of the same values
1304 | HirBinOp::Mul => MirBinOp::Mul,
| ------------- matches some of the same values
1305 | HirBinOp::Div => MirBinOp::Div,
| ------------- matches some of the same values
...
1331 | _ => MirBinOp::Add, // Fallback for Is/IsNot
| ^ ...and 17 other patterns collectively make this unreachable
warning: unused import: `CodegenError`
--> crates/codegen/src/emit.rs:5:28
|
5 | use crate::{CodeGenerator, CodegenError, CodegenResult};
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused variable: `object`
--> crates/codegen/src/bytecode.rs:483:36
|
483 | MirStmtKind::SetAttr { object, attr, value } => {
| ^^^^^^ help: try ignoring the field: `object: _`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `attr`
--> crates/codegen/src/bytecode.rs:483:44
|
483 | MirStmtKind::SetAttr { object, attr, value } => {
| ^^^^ help: try ignoring the field: `attr: _`
warning: unused variable: `value`
--> crates/codegen/src/bytecode.rs:483:50
|
483 | MirStmtKind::SetAttr { object, attr, value } => {
| ^^^^^ help: try ignoring the field: `value: _`
warning: unused variable: `index`
--> crates/codegen/src/bytecode.rs:486:55
|
486 | MirStmtKind::SetAttrIndex { object, attr, index, value } => {
| ^^^^^ help: try ignoring the field: `index: _`
warning: field `config` is never read
--> crates/codegen/src/emit.rs:11:5
|
10 | pub struct CodeEmitter {
| ----------- field in this struct
11 | config: TargetConfig,
| ^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: unused imports: `DiGraph` and `NodeIndex`
--> crates/borrowck/src/dataflow.rs:6:23
|
6 | use petgraph::graph::{DiGraph, NodeIndex};
| ^^^^^^^ ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `std::hash::Hash`
--> crates/borrowck/src/dataflow.rs:10:5
|
10 | use std::hash::Hash;
| ^^^^^^^^^^^^^^^
warning: unused import: `PlaceId`
--> crates/borrowck/src/moves.rs:6:28
|
6 | use crate::places::{Place, PlaceId};
| ^^^^^^^
warning: unused import: `bitflags::bitflags`
--> crates/borrowck/src/regions.rs:7:5
|
7 | use bitflags::bitflags;
| ^^^^^^^^^^^^^^^^^^
warning: unused imports: `ControlFlowGraph`, `LivenessAnalysis`, `StatementRhs`, `Statement`, and `self`
--> crates/borrowck/src/checker.rs:3:23
|
3 | use crate::dataflow::{self, ControlFlowGraph, LivenessAnalysis, Statement, StatementRhs};
| ^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^
warning: unused imports: `AllFacts` and `OutputFacts`
--> crates/borrowck/src/checker.rs:5:20
|
5 | use crate::facts::{AllFacts, FactGenerator, OutputFacts};
| ^^^^^^^^ ^^^^^^^^^^^
warning: unused import: `LifetimeId`
--> crates/borrowck/src/checker.rs:6:40
|
6 | use crate::lifetime::{LifetimeContext, LifetimeId};
| ^^^^^^^^^^
warning: unused import: `MoveError`
--> crates/borrowck/src/checker.rs:8:42
|
8 | use crate::moves::{InitStatus, MoveData, MoveError};
| ^^^^^^^^^
warning: unused imports: `PlaceElem` and `PlaceSet`
--> crates/borrowck/src/checker.rs:9:28
|
9 | use crate::places::{Place, PlaceElem, PlaceId, PlaceSet};
| ^^^^^^^^^ ^^^^^^^^
warning: unused imports: `ConstraintKind`, `ConstraintOrigin`, and `RegionId`
--> crates/borrowck/src/checker.rs:10:22
|
10 | use crate::regions::{ConstraintKind, ConstraintOrigin, RegionId, RegionInference};
| ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^
warning: unused imports: `Loan` and `Location`
--> crates/borrowck/src/diagnostics.rs:3:20
|
3 | use crate::loans::{Loan, LoanKind, Location};
| ^^^^ ^^^^^^^^
warning: unused import: `DiagnosticKind`
--> crates/borrowck/src/diagnostics.rs:7:32
|
7 | use roast_common::{Diagnostic, DiagnosticKind, Span};
| ^^^^^^^^^^^^^^
warning: unused import: `roast_common::prelude::*`
--> crates/borrowck/src/lib.rs:33:5
|
33 | use roast_common::prelude::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused variable: `idx`
--> crates/borrowck/src/places.rs:115:34
|
115 | PlaceElem::Field(idx, Some(sym)) => write!(f, ".{}", sym.as_raw())?,
| ^^^ help: if this is intentional, prefix it with an underscore: `_idx`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `body`
--> crates/borrowck/src/checker.rs:175:78
|
175 | fn check_terminator(&mut self, term: &MirTerminator, location: Location, body: &MirBody, span: Span) {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_body`
warning: unused variable: `location`
--> crates/borrowck/src/checker.rs:342:51
|
342 | fn check_read_place(&mut self, place: &Place, location: Location, span: Span) {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_location`
warning: unused variable: `location`
--> crates/borrowck/src/checker.rs:377:70
|
377 | fn check_write_place(&mut self, mir_place: &roast_mir::MirPlace, location: Location, span: Span) {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_location`
warning: field `interner` is never read
--> crates/borrowck/src/checker.rs:31:5
|
17 | pub struct BorrowChecker<'a> {
| ------------- field in this struct
...
31 | interner: &'a Interner,
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: unused import: `FxHashMap`
--> crates/optimizer/src/loop_opt.rs:4:18
|
4 | use rustc_hash::{FxHashMap, FxHashSet};
| ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `FxHashMap`
--> crates/optimizer/src/unroll.rs:20:18
|
20 | use rustc_hash::{FxHashMap, FxHashSet};
| ^^^^^^^^^
warning: unused import: `FxHashMap`
--> crates/optimizer/src/fusion.rs:34:18
|
34 | use rustc_hash::{FxHashMap, FxHashSet};
| ^^^^^^^^^
warning: unused imports: `CachedMethod` and `InlineCache`
--> crates/optimizer/src/pgo.rs:19:27
|
19 | use crate::inline_cache::{InlineCache, InlineCacheManager, ICState, ShapeId, MethodTarget, CachedMethod};
| ^^^^^^^^^^^ ^^^^^^^^^^^^
warning: unused import: `roast_typer::Type`
--> crates/optimizer/src/pgo.rs:21:5
|
21 | use roast_typer::Type;
| ^^^^^^^^^^^^^^^^^
warning: unused import: `FxHashSet`
--> crates/optimizer/src/pgo.rs:22:29
|
22 | use rustc_hash::{FxHashMap, FxHashSet};
| ^^^^^^^^^
warning: unused import: `std::sync::Arc`
--> crates/optimizer/src/pgo.rs:23:5
|
23 | use std::sync::Arc;
| ^^^^^^^^^^^^^^
warning: unused variable: `body`
--> crates/optimizer/src/loop_opt.rs:54:5
|
54 | body: &MirBody,
| ^^^^ help: if this is intentional, prefix it with an underscore: `_body`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `iv_local`
--> crates/optimizer/src/unroll.rs:536:49
|
536 | fn offset_iv_uses(&self, mut stmt: MirStmt, iv_local: LocalId, offset: i128) -> MirStmt {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_iv_local`
warning: unused variable: `offset`
--> crates/optimizer/src/unroll.rs:536:68
|
536 | fn offset_iv_uses(&self, mut stmt: MirStmt, iv_local: LocalId, offset: i128) -> MirStmt {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_offset`
warning: variable does not need to be mutable
--> crates/optimizer/src/unroll.rs:536:30
|
536 | fn offset_iv_uses(&self, mut stmt: MirStmt, iv_local: LocalId, offset: i128) -> MirStmt {
| ----^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: unused variable: `place`
--> crates/optimizer/src/fusion.rs:229:38
|
229 | if let MirStmtKind::Assign { place, value } = &stmt.kind {
| ^^^^^ help: try ignoring the field: `place: _`
warning: variable does not need to be mutable
--> crates/optimizer/src/fusion.rs:324:13
|
324 | let mut stmts = Vec::new();
| ----^^^^^
| |
| help: remove this `mut`
warning: unused variable: `f`
--> crates/optimizer/src/fusion.rs:352:18
|
352 | pub fn fuse_maps(f: &LambdaCapture, g: &LambdaCapture) -> Option<LambdaCapture> {
| ^ help: if this is intentional, prefix it with an underscore: `_f`
warning: unused variable: `g`
--> crates/optimizer/src/fusion.rs:352:37
|
352 | pub fn fuse_maps(f: &LambdaCapture, g: &LambdaCapture) -> Option<LambdaCapture> {
| ^ help: if this is intentional, prefix it with an underscore: `_g`
warning: unused variable: `p`
--> crates/optimizer/src/fusion.rs:367:21
|
367 | pub fn fuse_filters(p: &LambdaCapture, q: &LambdaCapture) -> Option<LambdaCapture> {
| ^ help: if this is intentional, prefix it with an underscore: `_p`
warning: unused variable: `q`
--> crates/optimizer/src/fusion.rs:367:40
|
367 | pub fn fuse_filters(p: &LambdaCapture, q: &LambdaCapture) -> Option<LambdaCapture> {
| ^ help: if this is intentional, prefix it with an underscore: `_q`
warning: unused variable: `func`
--> crates/optimizer/src/pgo.rs:396:42
|
396 | if let MirTerminator::Call { func, target, .. } = &mut block.terminator {
| ^^^^-
| |
| help: try removing the field
warning: unused variable: `target`
--> crates/optimizer/src/pgo.rs:396:48
|
396 | if let MirTerminator::Call { func, target, .. } = &mut block.terminator {
| ^^^^^^-
| |
| help: try removing the field
warning: unused variable: `candidate`
--> crates/optimizer/src/pgo.rs:393:32
|
393 | fn devirtualize(&mut self, candidate: DevirtCandidate) {
| ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_candidate`
warning: field `post_dominators` is never read
--> crates/optimizer/src/analysis.rs:12:5
|
7 | pub struct CfgAnalysis<'a> {
| ----------- field in this struct
...
12 | post_dominators: FxHashMap<BlockId, BlockId>,
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: fields `init` and `step` are never read
--> crates/optimizer/src/loop_opt.rs:271:5
|
269 | struct InductionVariable {
| ----------------- fields in this struct
270 | local: LocalId,
271 | init: MirConstant,
| ^^^^
272 | step: MirConstant,
| ^^^^
|
= note: `InductionVariable` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
warning: fields `next_block_id` and `next_local_id` are never read
--> crates/optimizer/src/unroll.rs:280:5
|
277 | pub struct LoopUnroller<'a> {
| ------------ fields in this struct
...
280 | next_block_id: BlockId,
| ^^^^^^^^^^^^^
281 | next_local_id: LocalId,
| ^^^^^^^^^^^^^
warning: methods `alloc_block_id` and `alloc_local_id` are never used
--> crates/optimizer/src/unroll.rs:543:8
|
284 | impl<'a> LoopUnroller<'a> {
| ------------------------- methods in this implementation
...
543 | fn alloc_block_id(&mut self) -> BlockId {
| ^^^^^^^^^^^^^^
...
549 | fn alloc_local_id(&mut self) -> LocalId {
| ^^^^^^^^^^^^^^
warning: methods `get_field_name` and `extract_field_path` are never used
--> crates/optimizer/src/sroa.rs:158:8
|
91 | impl<'a> SroaPass<'a> {
| --------------------- methods in this implementation
...
158 | fn get_field_name(&self, ty: &Type, field_idx: u32) -> Option<String> {
| ^^^^^^^^^^^^^^
...
305 | fn extract_field_path(&self, projections: &[MirProjection]) -> Vec<u32> {
| ^^^^^^^^^^^^^^^^^^
warning: field `next_local_id` is never read
--> crates/optimizer/src/fusion.rs:254:5
|
251 | pub struct FusionTransformer<'a> {
| ----------------- field in this struct
...
254 | next_local_id: LocalId,
| ^^^^^^^^^^^^^
warning: method `alloc_local_id` is never used
--> crates/optimizer/src/fusion.rs:344:8
|
258 | impl<'a> FusionTransformer<'a> {
| ------------------------------ method in this implementation
...
344 | fn alloc_local_id(&mut self) -> LocalId {
| ^^^^^^^^^^^^^^
warning: fields `site_id`, `shape`, `target`, and `confidence` are never read
--> crates/optimizer/src/pgo.rs:415:5
|
414 | struct DevirtCandidate {
| --------------- fields in this struct
415 | site_id: u32,
| ^^^^^^^
416 | shape: ShapeId,
| ^^^^^
417 | target: MethodTarget,
| ^^^^^^
418 | confidence: f64,
| ^^^^^^^^^^
|
= note: `DevirtCandidate` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
warning: field `body` is never read
--> crates/optimizer/src/pgo.rs:427:5
|
426 | pub struct SpeculativeInliner<'a> {
| ------------------ field in this struct
427 | body: &'a mut MirBody,
| ^^^^
warning: field `site_id` is never read
--> crates/optimizer/src/pgo.rs:547:5
|
546 | struct InlineCandidate {
| --------------- field in this struct
547 | site_id: u32,
| ^^^^^^^
|
= note: `InlineCandidate` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
warning: unused imports: `RUNTIME_DECLARATIONS` and `TypeTag`
--> crates/llvm_backend/src/types.rs:17:22
|
17 | use crate::runtime::{RUNTIME_DECLARATIONS, TypeTag};
| ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `std::io::Write`
--> crates/llvm_backend/src/lib.rs:1225:13
|
1225 | use std::io::Write;
| ^^^^^^^^^^^^^^
warning: unused variable: `escaped`
--> crates/llvm_backend/src/lib.rs:1189:33
|
1189 | ... let escaped = method_name.replace("\\", "\\5C").replace("\"", "\\22");
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_escaped`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `body`
--> crates/llvm_backend/src/lib.rs:2803:48
|
2803 | MirAggregateKind::Lambda { params, body } => {
| ^^^^ help: try ignoring the field: `body: _`
warning: unused variable: `unwind`
--> crates/llvm_backend/src/lib.rs:3407:68
|
3407 | MirTerminator::Call { func, args, destination, target, unwind } => {
| ^^^^^^ help: try ignoring the field: `unwind: _`
warning: unused variable: `finally`
--> crates/llvm_backend/src/lib.rs:4489:55
|
4489 | MirTerminator::TryBegin { body, handlers, finally, exit } => {
| ^^^^^^^ help: try ignoring the field: `finally: _`
warning: fields `ir`, `declarations`, `definitions`, and `class_globals` are never read
--> crates/llvm_backend/src/lib.rs:478:5
|
475 | pub struct LlvmCodeGen {
| ----------- fields in this struct
...
478 | ir: String,
| ^^
479 | /// Function declarations
480 | declarations: Vec<String>,
| ^^^^^^^^^^^^
481 | /// Function definitions
482 | definitions: Vec<String>,
| ^^^^^^^^^^^
...
494 | class_globals: HashMap<String, String>,
| ^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: methods `fresh_label` and `generate_block` are never used
--> crates/llvm_backend/src/lib.rs:1434:8
|
1416 | impl<'a> FunctionGen<'a> {
| ------------------------ methods in this implementation
...
1434 | fn fresh_label(&mut self) -> usize {
| ^^^^^^^^^^^
...
1868 | fn generate_block(&mut self, block: &MirBlock) -> LlvmResult<()> {
| ^^^^^^^^^^^^^^
warning: unused import: `std::cell::RefCell`
--> crates/runtime/src/executor.rs:5:5
|
5 | use std::cell::RefCell;
| ^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused doc comment
--> crates/runtime/src/native_full.rs:4318:1
|
4318 | /// Thread-local exception state
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macro invocations
|
= help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion
= note: `#[warn(unused_doc_comments)]` on by default
warning: unused import: `BufReader`
--> crates/runtime/src/native_full.rs:4681:37
|
4681 | use std::io::{Read, Write, BufRead, BufReader};
| ^^^^^^^^^
warning: unused import: `BufRead`
--> crates/runtime/src/native_full.rs:4681:28
|
4681 | use std::io::{Read, Write, BufRead, BufReader};
| ^^^^^^^
warning: unused variable: `result`
--> crates/runtime/src/native_full.rs:2461:25
|
2461 | let result = method_fn(obj);
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `current_class`
--> crates/runtime/src/native_full.rs:3121:17
|
3121 | let mut current_class = (*sup).start_class;
| ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_current_class`
warning: variable does not need to be mutable
--> crates/runtime/src/native_full.rs:3121:13
|
3121 | let mut current_class = (*sup).start_class;
| ----^^^^^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: unused variable: `args`
--> crates/runtime/src/native_full.rs:3167:5
|
3167 | args: *const c_long,
| ^^^^ help: if this is intentional, prefix it with an underscore: `_args`
warning: unused variable: `nargs`
--> crates/runtime/src/native_full.rs:3168:5
|
3168 | nargs: c_long,
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_nargs`
warning: unused variable: `obj`
--> crates/runtime/src/native_full.rs:3291:66
|
3291 | pub extern "C" fn roast_property_get(prop: *const RoastProperty, obj: c_long) -> c_long {
| ^^^ help: if this is intentional, prefix it with an underscore: `_obj`
warning: unused variable: `obj`
--> crates/runtime/src/native_full.rs:3308:66
|
3308 | pub extern "C" fn roast_property_set(prop: *const RoastProperty, obj: c_long, value: c_long) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_obj`
warning: unused variable: `value`
--> crates/runtime/src/native_full.rs:3308:79
|
3308 | pub extern "C" fn roast_property_set(prop: *const RoastProperty, obj: c_long, value: c_long) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_value`
warning: unused variable: `exc`
--> crates/runtime/src/native_full.rs:4580:43
|
4580 | pub extern "C" fn roast_exception_matches(exc: c_long, type_name: *const c_char) -> c_long {
| ^^^ help: if this is intentional, prefix it with an underscore: `_exc`
warning: field `roots` is never read
--> crates/runtime/src/gc.rs:73:5
|
72 | pub struct CycleCollector {
| -------------- field in this struct
73 | roots: Mutex<Vec<*const ()>>,
| ^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: fields `exception_type` and `exception_value` are never read
--> crates/runtime/src/native_full.rs:4304:5
|
4302 | struct ExceptionFrame {
| -------------- fields in this struct
4303 | jmp_buf: JmpBuf,
4304 | exception_type: c_long,
| ^^^^^^^^^^^^^^
4305 | exception_value: c_long,
| ^^^^^^^^^^^^^^^
warning: constant `FILE_TAG` is never used
--> crates/runtime/src/native_full.rs:4693:7
|
4693 | const FILE_TAG: u8 = 20;
| ^^^^^^^^
warning: function `setjmp` is never used
--> crates/runtime/src/native_full.rs:4209:8
|
4209 | fn setjmp(env: *mut JmpBuf) -> c_int;
| ^^^^^^
warning: unused import: `FrameState`
--> crates/vm/src/interpreter.rs:3:49
|
3 | use crate::frame::{CallFrame, ExceptionHandler, FrameState};
| ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `HeapId`
--> crates/vm/src/interpreter.rs:4:25
|
4 | use crate::heap::{Heap, HeapId};
| ^^^^^^
warning: unused import: `std::cell::RefCell`
--> crates/vm/src/heap.rs:5:5
|
5 | use std::cell::RefCell;
| ^^^^^^^^^^^^^^^^^^
warning: unused import: `std::rc::Rc`
--> crates/vm/src/heap.rs:6:5
|
6 | use std::rc::Rc;
| ^^^^^^^^^^^
warning: unused import: `std::sync::Arc`
--> crates/vm/src/builtins.rs:4:5
|
4 | use std::sync::Arc;
| ^^^^^^^^^^^^^^
warning: unused variable: `frame`
--> crates/vm/src/interpreter.rs:224:32
|
224 | let func = if let Some(frame) = self.frames.last() {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_frame`
|
= note: `#[warn(unused_variables)]` on by default
warning: variable does not need to be mutable
--> crates/vm/src/interpreter.rs:970:29
|
970 | let mut gen_state = gen.lock().unwrap();
| ----^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: unused variable: `code`
--> crates/vm/src/interpreter.rs:1559:28
|
1559 | Constant::Code(code) => Value::None, // Functions are more complex
| ^^^^ help: if this is intentional, prefix it with an underscore: `_code`
warning: unused variable: `s`
--> crates/vm/src/interpreter.rs:1711:24
|
1711 | Value::Str(s) => match name {
| ^ help: if this is intentional, prefix it with an underscore: `_s`