GCC Rust Weekly Status Report 14

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

Milestone Progress

There was no change in the percentage progress for the milestone this week, but we are still on track to be finished by the end of the week. Several of the final tasks are mostly finished but need some more cleanup and testing before they can be merged.

Monthly Community Call

We had our monthly community call for the project on zulip on 7th May 2021 at 10am UTC+1. You can find our meeting minutes: here

Detailed changelog

Fix crash in parser with bad syntax

The parser had a crash when there was a space in between “+” and “=” which has been fixed with a simple null check from a new contributor: teromene

fn test() {
    let mut a = 1;
    a + = 1;
}

Stricter type checking

All implicit inference variables now get location info which is important for cases where a Path resolves to a generic impl item but the Self type cannot be inferred at that position. To get around this rust expects you to use a turbo fish to explicitly set the type parameter here.

struct Foo<T>(T, bool);

impl<T> Foo<T> {
    fn test() -> i32 {
        123
    }
}

fn main() {
    let a = Foo::test();
    // { dg-error "type annotations needed" "" { target { *-*-* } } .-1 }
}

Fix crash when returning a generic tuple

The compiler would crash when you return a generic tuple as it was missing some substitution checks.

fn test<A,B>(a:A, b:B) -> (A,B) {
    (a,b)
}

fn main() {
    let a = test::<i32, i32>(123, 456);
    let b = test::<f32, f32>(123f32, 456f32);
}

Completed Activities

  • Fix bug in parser: PR409
  • Stricter type checking: PR406
  • Crash in generics: PR416
  • Testsuite cleanup: PR411

Overall Task Status

CategoryLast WeekThis WeekDelta
TODO6769+2
In Progress78+1
Completed125128+3
GitHub Issues

Test Cases

CategoryLast WeekThis WeekDelta
Passing21902261+71
XFAIL3840+2
Failed
make check-rust

Bugs

CategoryLast WeekThis WeekDelta
TODO1415+1
In Progress35+2
Completed3537+2
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 – Generics92%92%11th Feb 202128th May 2021
Data Structures 3 – Traits0%0%27th Aug 2021
Control Flow 2 – Pattern Matching0%0%29th Oct 2021
Imports and Visibility0%0%TBD
GitHub Milestones

Risks

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

Planned Activities

  • Complete Generics milestone
  • Plan out traits milestone

Leave a Reply

Your email address will not be published.