File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,11 @@ impl Lower for Program {
42
42
43
43
// Make a vector mapping each thing in `items` to an id,
44
44
// based just on its position:
45
- let raw_ids = self . items . iter ( ) . map ( |_| lowerer. next_item_id ( ) ) . collect ( ) ;
45
+ let raw_ids = self
46
+ . items
47
+ . iter ( )
48
+ . map ( |_| lowerer. next_item_id ( ) )
49
+ . collect :: < Vec < _ > > ( ) ;
46
50
47
51
lowerer. extract_associated_types ( self , & raw_ids) ?;
48
52
lowerer. extract_ids ( self , & raw_ids) ?;
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ impl ProgramLowerer {
53
53
pub fn extract_associated_types (
54
54
& mut self ,
55
55
program : & Program ,
56
- raw_ids : & Vec < RawId > ,
56
+ raw_ids : & [ RawId ] ,
57
57
) -> LowerResult < ( ) > {
58
58
for ( item, & raw_id) in program. items . iter ( ) . zip ( raw_ids) {
59
59
match item {
@@ -86,7 +86,7 @@ impl ProgramLowerer {
86
86
Ok ( ( ) )
87
87
}
88
88
89
- pub fn extract_ids ( & mut self , program : & Program , raw_ids : & Vec < RawId > ) -> LowerResult < ( ) > {
89
+ pub fn extract_ids ( & mut self , program : & Program , raw_ids : & [ RawId ] ) -> LowerResult < ( ) > {
90
90
for ( item, & raw_id) in program. items . iter ( ) . zip ( raw_ids) {
91
91
match item {
92
92
Item :: AdtDefn ( defn) => {
@@ -140,7 +140,7 @@ impl ProgramLowerer {
140
140
Ok ( ( ) )
141
141
}
142
142
143
- pub fn lower ( self , program : & Program , raw_ids : & Vec < RawId > ) -> LowerResult < LoweredProgram > {
143
+ pub fn lower ( self , program : & Program , raw_ids : & [ RawId ] ) -> LowerResult < LoweredProgram > {
144
144
let mut adt_data = BTreeMap :: new ( ) ;
145
145
let mut adt_reprs = BTreeMap :: new ( ) ;
146
146
let mut adt_variances = BTreeMap :: new ( ) ;
You can’t perform that action at this time.
0 commit comments