GCC Rust – Weekly Status Report – Jan 4th

This was the first week back since the Christmas vacation, it was good to get back into Rust. The focus was making sure the name resolver was working correctly by creating an unused name pass which threw up some bugs which had to be resolved on the way.

Implicit Returns was the other big focus and with the help from @bjorn3 it helped me understand fully the implementation the official Rust compiler has made. The particular case in question was:

fn test() -> i32 {
    if x > 1 {
        5
    } else {
        0
    }
    123
}

This test case demonstrates that Rust treats the final last expression as the result of the function. Which means the if block is treated as a statement which should be unit type. Though if you were to remove the final expression of 123 this is now valid.

Completed Activities

Overall Task Status

CategoryLast WeekThis WeekDelta
TODO3532-3
In Progress56+1
Completed2333+10
GitHub Issues

Test Suite

Last WeekThis WeekDelta
Passing124220+96
Failed80-8
make check-rust

Milestone Overview

MilestoneLast WeekThis WeekDelta
Core Data Structures61%79%+18%
Basic Control Flow14%14%
Generics0%0%
Traits0%0%
Pattern Matching0%0%
Imports0%0%

Planned Activities for week starting 11th Jan

  • Release Blog Post on Embecosm website
  • Notify GCC Mailing list
  • Add documentation for the name resolver on github wiki
  • Mutability
  • Tuples

Leave a Reply

Your email address will not be published.