GCC Rust Weekly Status Report 17


Thanks again to Open Source Security, inc and Embecosm for their ongoing support for this project.

Milestone Progress

For Traits the first piece of work needed was to actually implement a trait using a trait impl block. This forms the basis to start enforcing obligations. I believe the milestones most difficult tickets hit early on, and if the implementation for enforcing obligations is done right from the start, the final items in the milestone should be easier.

Monthly Community Call

We had our 3nd community call over on Zulip you can find the notes over on: https://github.com/Rust-GCC/Reporting/blob/main/2021-06-04-community-call.md

Google Summer of Code

Cargo Support

Arthur Cohen has been working on adding cargo support for GCCRS. He has already added support for GCCRS to accept inputs via stdin. So for example you should be able to invoke the compiler with ‘-’ and it will read parse input until EOF from stdin. He has also been to find issues and missing features such as the target options that cargo uses to infer what extensions to use for static or dynamic libraries for example. We partially have this via -frust-dump-target_options but it needs some more work.

Static Analysis

Wenzhang Yang has similarly continued his work, this week it included a very big cleanup of Attribues within GCCRS. One of the key parts of this project is developing a framework to work with attributes such as allow_deadcode. Since our HIR data structures were bootstrapped from our AST, this meant all attributes were duplicated into the HIR this means our HIR can simply reference the AST attributes avoiding duplication.

Detailed changelog

Reorganise the testsuite

Recently I noticed that the test suite numbers didn’t really match up to what I expected. Thomas has cleaned this up again. Since the front-end is still early on there are many features of Rust we do not support yet so we have an unsupported set of tests that are now marked with XFAIL since we expect these tests to fail, since they are not supported yet. We still contain expected failure test cases such as ensuring we error correctly for bad types, for example, the only difference now is that these expected failures are now counted as a normally expected pass.

Build fixes for arm32, mips and rs6000

Thanks to our new contributor John Paul Adrian Glaubitz has been testing GCC Rust on as many architectures as he can which has resulted in many bug fixes for our TargetOptions support. This is key for Arthur’s google summer of code project, but also for cfg expansions.

Trait impl blocks

In order to begin work on traits we must first be able to implement a trait. This was a big PR and allows us to begin work on Trait Obligations and desugar the AST into HIR further. Since TraitImplItems should be treated the same as normal Impl Items.

trait Foo {
    fn bar() -> i32;

struct Test<T>(T);

impl<T> Foo for Test<T> {
    fn bar() -> i32 {

fn main() {
    let a: i32;
    a = Test::<i32>::bar();

What was nice to see is that the work on generics did not need hanged to support this example test case. The compiler currently is not enforcing the trait here, but this is the building block to begin this work since trait obligations will be used anywhere to enforce any predicate of a trait.

Completed Activities

  • Build Fixes for arm32 and rs6000 – PR488 PR482 PR475 PR478
  • Fix warnings for format specifiers – PR486
  • Ensure all toplevel items respect their Canonical Path prefix – PR485
  • Trait impl block support – PR484
  • Add -frust-debug for verbose debug output – PR480 PR466
  • Reuse AST attributes – PR469 PR453
  • Support pipe input – PR458 PR460


Excluding merges, 7 authors have pushed 24 commits to master and 24 commits to all branches. On master, 290 files have changed and there have been 2,006 additions and 2,920 deletions.

Merged PRs18
GitHub Pulse

Overall Task Status

CategoryLast WeekThis WeekDelta
In Progress66
GitHub Issues

Test Cases

CategoryLast WeekThis WeekDelta
make check-rust


CategoryLast WeekThis WeekDelta
In Progress22
GitHub Bugs

Milestones Progress

MilestoneLast WeekThis WeekDeltaStart DateCompletion DateTarget
Data Structures 1 – Core100%100%30th Nov 202027th Jan 202129th Jan 2021
Control Flow 1 – Core100%100%28th Jan 202110th Feb 202126th Feb 2021
Data Structures 2 – Generics100%100%11th Feb 202114th May 202128th May 2021
Data Structures 3 – Traits0%10%+10%20th May 202127th Aug 2021
Control Flow 2 – Pattern Matching0%0%29th Oct 2021
Imports and Visibility0%0%TBD
GitHub Milestones


RiskImpact (1-3)Likelihood (0-10)Risk (I * L)Mitigation
Copyright assignments236Be up front on all PRs that the code is destined to be upstreamed to FSF
Rust Language Changes3721Keep up to date with the Rust language on a regular basis

Planned Activities

  • Begin working on Trait Obligations

Leave a Reply

Your email address will not be published.