Overview
Thanks again to Open Source Security, inc and Embecosm for their ongoing support for this project.
Project update
The month of June saw a good number of contributions to the project, with 61 pull-requests merged - despite Pierre-Emmanuel and Arthur both being on vacation for two weeks each. One of the most important milestones this month was the merge of our name-resolution 2.0 algorithm, and the removal of the previous version. This merge marks the end of a year and a half of work aimed at better handling the complex import and export structure in `core`, while remaining as powerful as the existing solution.
Another major breakthrough is the completion of our git process rework - thanks to the work of Marc Poulhies, Thomas Schwinge and Owen Avery, we have considerably improved our processes for updating our fork and upstreaming changes. Work on gerris has resumed, with more features being added to the bot. This should enable us to prepare branches automatically, test them on our CI, and have them ready for verification by one of our maintainers before sending the commits upstream to GCC. Similarly, gerris will soon be able to update our fork with the latest changes from upstream GCC and will do so regularly.
We have also established further milestones for the next few months of work on gccrs, as we get closer and closer to experimenting with the kernel’s alloc crate. We have discovered more interesting nightly features being used by the crate, which we will implement in the coming months.
-
try blocks
try blocks are used throughout core, especially in the implementation of the various iterators such as try_fold:
fn try_fold<B, F, R>(&mut self, init: B, mut f: F) -> R where Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try<Ok = B>, { let mut accum = init; while let Some(x) = self.next() { accum = f(accum, x)?; } try { accum } // HERE }try blocks create a scope in which it is possible to use the ? operator. They are syntactic sugar for the following construct:
try { <stmts>; <expr> } // becomes { <stmts>; ::std::ops::Try::from_ok(<expr>) }Handling them in the majority of cases should hopefully be a simple desugar that can be implemented quite quickly.
-
const-generic inference
Const-generic inference allows the user to instruct the compiler to deduct the value of a const generic instead of spelling it out explicitly. This is used in the stdarch crate, which core depends on, for the simd_shuffle macro, which takes as argument an array of unknown but fixed size:
macro_rules! simd_shuffle { ($x:expr, $y:expr, $idx:expr $(,)?) => { simd_shuffle( $x, $y, const { let v: [u32; _] = $idx; v }, ) }; } let d: uint8x8_t = simd_shuffle!(b, b, [8, 9, 10, 11, 12, 13, 14, 15]); let e: uint16x4_t = simd_shuffle!(c, c, [4, 5, 6, 7]);Since the array’s size is known by the compiler, but not by the user writing the macro, we can rely on the compiler to infer the array’s size and call the proper intrinsic, while still keeping the macro definition and invocations simple.
-
Further milestones
Milestone Inline assembly try blocks while-let loops core attributes core nightly features defered inference Argument Position impl Trait Return Position impl Trait Fn traits Recursive types Drop Pin, PinInit offsetof!() In other news, our two GSoC students Zhi Heng and Ryutaro Okada are progressing nicely on their projects, with both students passing the upcoming midterm evaluation with flying colors. We are very satisfied with the speed at which they are working, as well as their comprehension of the task at hand. Ryutaro was able to reimplement one of our checks for assignments to read-only variables, and can now support generic functions, which was not allowed before. In the meantime, Zhi Heng has contributed multiple improvements to our backend regarding the compilation of complicated patterns such as tuple patterns and slice patterns.
Finally, we are also in the process of merging fixes for the release of GCC 15.2.
We will have our next monthly community call on the 15th of July at 9am UTC. You can subscribe to our calendar to see when the next one will be held. The call is open to everyone, even if you would just like to sit-in and listen. You can also subscribe to our mailing-list or join our Zulip chat to be notified of upcoming events.
- Jitsi link
- Calendar ID: 7060a0923ffebd3cb52b1afef35a28ff7b64f05962c9af84c23b1847f1f5f894@group.calendar.google.com
- Google calendar link
- iCal link
Call for contribution
Completed Activities
- Change enum to enum class PR3878
- Remove Late visitor override for StructStruct PR3873
- Allow format_args to accept a raw string literal PR3872
- Parse try expressions PR3870
- Remove reinterpret_cast usages in DefaultASTVisitor PR3869
- nr1.0: Remove rust/backend support PR3865
- Remove -frust-name-resolution-2.0 usage in tests PR3864
- gccrs: Implement compilation support for TuplePatternItems::RANGED PR3863
- Add locus getters PR3861
- gccrs: Implement type checking for ItemType::RANGED in TuplePattern PR3859
- Add getter for outer attributions PR3858
- Add getter for non const lifetime object PR3857
- Update C++ version check in rust-lang.cc PR3856
- Create Rust::GGC::Ident PR3855
- Implement default HIR visitor class PR3854
- gccrs: Fix bug with non compiled const decl PR3853
- gccrs: check for invalid const calls during code-gen PR3852
- Reenable macos CI PR3851
- gccrs: Fix TupleStructPattern compilation throwing error PR3850
- gccrs: Add unify rules for fnptr and closures PR3849
- gccrs: Cleanup and refactor method resolution PR3848
- gccrs: Refactor marker builtin trait assembly PR3847
- gccrs: Fix bug with bad type bindings not looking at super traits PR3846
- gccrs: Fix cyclical projection to placeholder PR3845
- gccrs: Fix silly ordering bug in trait reference resolution PR3844
- gccrs: Ensure we look at the bounds behind a reference PR3843
- nr2.0: Fix resolution of constant items PR3841
- nr2.0: Enable by default PR3840
- nr2.0: Adjust resolution of external crates PR3839
- gccrs: Add test case showing RPIT working to close issue PR3837
- gccrs: Fix ICE when constant is missing and expression PR3834
- gccrs: Fix issues around PartialEq Eq Ord Partial Ord PR3832
- Fix execute testsuite PR3831
- Adjust external crate lowering and type checking PR3830
- nr2.0: Add more checks for alternate patterns PR3829
- nr2.0: Update IdentifierPattern’s subpattern name resolution PR3828
- gccrs: Improve HIR dumps for patterns PR3827
- nr2.0: Adjust resolution of modules PR3826
- gccrs: Fix bug in query type stopping PartialOrd PR3825
- gccrs: Fix bad type canonicalization on ARRAYTYPES PR3824
- nr2.0: Adjust lookup of associated items PR3823
- gccrs: Implement compilation of IdentifierPattern’s subpattern bindings PR3822
- nr2.0: Adjust alternate identifier handling PR3821
- nr2.0: Improve handling of single segment paths PR3820
- nr2.0: Fix closure parameter scoping PR3819
- Add derive(Ord) and derive(PartialOrd) PR3818
- nr2.0: Adjust pub_restricted tests PR3817
- nr2.0: Improve StructPatternFieldIdent handling PR3816
- Add new function ClosureExpr::get_definition_expr PR3815
- gccrs: Add initial compilation support for IdentifierPattern’s subpatterns PR3814
- fix: ICE when parsing unterminated raw byte strings PR3812
- gccrs: Lower IdentifierPattern’s tobind to HIR PR3811
- Make ConstantItem use Identifier PR3810
- parser: fix ICE std::outofrange with path attrs to nonexisting path PR3804
- nr2.0: Run a final TopLevel pass after desugaring PR3801
- AST: Add reconstruct_type() method PR3799
- nr2.0: Catch Self in impl block self types PR3798
- Adjust CI to ignore non-rust warnings PR3796
- nr2.0: Improve visibility path handling PR3785
- nr2.0: Separate out canonical path handling PR3776
- Synchronize development branch with GCC’s master branch PR3761
Contributors this month
-
Zhi Heng (new contributor!)
-
Ryutaro Okada (new contributor!)
-
Vishruth Thimmaiah (new contributor!)
Overall Task Status
| TODO | 471 | 469 | -2 |
| In Progress | 114 | 112 | -2 |
| Completed | 1064 | 1077 | +13 |
Bugs
| TODO | 207 | 207 | - |
| In Progress | 56 | 54 | -2 |
| Completed | 521 | 526 | +5 |
Test Cases
| Passing | 10631 | 9949 | -682 |
| Failed | - | - | - |
| XFAIL | 73 | 64 | -9 |
| XPASS | - | - | - |
Milestones Progress
| Explicit generics with impl Trait | 40% | 85% | +45% | 28th Feb 2025 | - | 28th Mar 2025 | GCC 16.1 |
| Final Inline assembly fixes | 0% | 0% | - | - | GCC 16.1 | ||
| try blocks | 0% | 0% | - | - | GCC 16.1 | ||
| while-let loops | 0% | 0% | - | - | GCC 16.1 |
| Unstable RfL features | 0% | 0% | - | 7th Jan 2025 | - | 1st Aug 2025 | GCC 16.1 |
| Generic Associated Types | 0% | 0% | - | 15th Mar 2025 | - | 15th Jun 2025 | GCC 16.1 |
| RfL const generics | 0% | 0% | - | 1st May 2025 | - | 15th Jun 2025 | GCC 16.1 |
| frontend plugin hooks | 0% | 0% | - | 15th May 2025 | - | 7th Jul 2025 | GCC 16.1 |
| Handling the testsuite issues | 0% | 0% | - | 15th Sep 2024 | - | 15th Sep 2025 | GCC 16.1 |
| main shim | 0% | 0% | - | 28th Jul 2025 | - | 15th Sep 2025 | GCC 16.1 |
| Final core attributes | 0% | 0% | - | - | GCC 16.1 | ||
| Core nightly features | 0% | 0% | - | - | GCC 16.1 | ||
| Defered inference | 0% | 0% | - | - | GCC 16.1 | ||
| Fn traits fixes | 0% | 0% | - | - | GCC 16.1 | ||
| Recursive types | 0% | 0% | - | - | GCC 16.1 | ||
| Drop | 0% | 0% | - | - | GCC 16.1 | ||
| Pin, PinInit | 0% | 0% | - | - | GCC 16.1 | ||
| offsetof!() builtin macro | 0% | 0% | - | 15th Mar 2025 | - | 15th Aug 2025 | GCC 16.1 |
| Data Structures 1 - Core | 100% | 100% | - | 30th Nov 2020 | 27th Jan 2021 | 29th Jan 2021 | GCC 14.1 |
| Control Flow 1 - Core | 100% | 100% | - | 28th Jan 2021 | 10th Feb 2021 | 26th Feb 2021 | GCC 14.1 |
| Data Structures 2 - Generics | 100% | 100% | - | 11th Feb 2021 | 14th May 2021 | 28th May 2021 | GCC 14.1 |
| Data Structures 3 - Traits | 100% | 100% | - | 20th May 2021 | 17th Sep 2021 | 27th Aug 2021 | GCC 14.1 |
| Control Flow 2 - Pattern Matching | 100% | 100% | - | 20th Sep 2021 | 9th Dec 2021 | 29th Nov 2021 | GCC 14.1 |
| Macros and cfg expansion | 100% | 100% | - | 1st Dec 2021 | 31st Mar 2022 | 28th Mar 2022 | GCC 14.1 |
| Imports and Visibility | 100% | 100% | - | 29th Mar 2022 | 13th Jul 2022 | 27th May 2022 | GCC 14.1 |
| Const Generics | 100% | 100% | - | 30th May 2022 | 10th Oct 2022 | 17th Oct 2022 | GCC 14.1 |
| Initial upstream patches | 100% | 100% | - | 10th Oct 2022 | 13th Nov 2022 | 13th Nov 2022 | GCC 14.1 |
| Upstream initial patchset | 100% | 100% | - | 13th Nov 2022 | 13th Dec 2022 | 19th Dec 2022 | GCC 14.1 |
| Update GCC’s master branch | 100% | 100% | - | 1st Jan 2023 | 21st Feb 2023 | 3rd Mar 2023 | GCC 14.1 |
| Final set of upstream patches | 100% | 100% | - | 16th Nov 2022 | 1st May 2023 | 30th Apr 2023 | GCC 14.1 |
| Borrow Checking 1 | 100% | 100% | - | TBD | 8th Jan 2024 | 15th Aug 2023 | GCC 14.1 |
| Procedural Macros 1 | 100% | 100% | - | 13th Apr 2023 | 6th Aug 2023 | 6th Aug 2023 | GCC 14.1 |
| GCC 13.2 Release | 100% | 100% | - | 13th Apr 2023 | 22nd Jul 2023 | 15th Jul 2023 | GCC 14.1 |
| GCC 14 Stage 3 | 100% | 100% | - | 1st Sep 2023 | 20th Sep 2023 | 1st Nov 2023 | GCC 14.1 |
| GCC 14.1 Release | 100% | 100% | - | 2nd Jan 2024 | 2nd Jun 2024 | 15th Apr 2024 | GCC 14.1 |
| formatargs!() support | 100% | 100% | - | 15th Feb 2024 | - | 1st Apr 2024 | GCC 14.1 |
| GCC 14.2 | 100% | 100% | - | 7th Jun 2024 | 15th Jun 2024 | 15th Jun 2024 | GCC 14.2 |
| GCC 15.1 | 100% | 100% | - | 21st Jun 2024 | 31st Jun 2024 | 1st Jul 2024 | GCC 15.1 |
| Unhandled attributes | 100% | 100% | - | 1st Jul 2024 | 15th Aug 2024 | 15th Aug 2024 | GCC 15.1 |
| Inline assembly | 100% | 100% | - | 1st Jun 2024 | 26th Aug 2024 | 15th Sep 2024 | GCC 15.1 |
| Rustc Testsuite Adaptor | 100% | 100% | - | 1st Jun 2024 | 26th Aug 2024 | 15th Sep 2024 | GCC 15.1 |
| Borrow checker improvements | 100% | 100% | - | 1st Jun 2024 | 26th Aug 2024 | 15th Sep 2024 | GCC 15.1 |
| Deref and DerefMut improvements | 100% | 100% | - | 28th Sep 2024 | 25th Oct 2024 | 28th Dec 2024 | GCC 15.1 |
| Indexing fixes | 100% | 100% | - | 21st Jul 2024 | 25th Dec 2024 | 15th Nov 2024 | GCC 15.1 |
| Iterator fixes | 100% | 100% | - | 21st Jul 2024 | 25th Dec 2024 | 15th Nov 2024 | GCC 15.1 |
| Auto traits improvements | 100% | 100% | - | 15th Sep 2024 | 20th Jan 2025 | 21st Dec 2024 | GCC 15.1 |
| Lang items | 100% | 100% | - | 1st Jul 2024 | 10th Jan 2025 | 21st Nov 2024 | GCC 15.1 |
| alloc parser issues | 100% | 100% | - | 7th Jan 2025 | 31st Jun 2024 | 28th Jan 2025 | GCC 15.1 |
| std parser issues | 100% | 100% | - | 7th Jan 2025 | 31st Jun 2024 | 28th Jan 2025 | GCC 16.1 |
| Question mark operator | 100% | 100% | - | 15th Dec 2024 | 21st Feb 2025 | 21st Feb 2025 | GCC 15.1 |
| Name resolution 2.0 rework | 100% | 100% | - | 1st Jun 2024 | - | 1st Apr 2025 | GCC 15.1 |
| Macro expansion | 100% | 100% | - | 1st Jun 2024 | - | 1st Jan 2025 | GCC 15.1 |
| Remaining typecheck issues | 100% | 100% | - | 21st Oct 2024 | - | 1st Mar 2025 | GCC 15.1 |
| cfg-core | 100% | 100% | - | 1st Dec 2024 | 24th Mar 2025 | 1st Mar 2025 | GCC 15.1 |
| Codegen fixes | 100% | 100% | - | 7th Oct 2024 | 1st Apr 2025 | 1st Mar 2025 | GCC 15.1 |
| blackbox intrinsic | 100% | 100% | - | 28th Oct 2024 | - | 28th Jan 2025 | GCC 15.1 |
| let-else | 100% | 100% | - | 28th Jan 2025 | - | 28th Feb 2025 | GCC 15.1 |
| Specialization | 100% | 100% | - | 1st Jan 2025 | 1st Apr 2025 | 1st Mar 2025 | GCC 15.1 |
| cfg-rfl | 100% | 100% | - | 7th Jan 2025 | 19th Mar 2025 | 15th Feb 2025 | GCC 15.1 |
| Downgrade to Rust 1.49 | 100% | 100% | - | 14th Mar 2025 | 26th Mar 2025 | 1st Apr 2025 | GCC 15.1 |
Planned Activities
- Start working on try blocks and while-let loops
- Finish name resolution and macro expansion issues
Risks
We must establish the list of GCC-common changes we need, as we will have to send them upstream before the start of Stage 3 around November. This is the only risk which could incur further problems and prevent more gccrs features from landing in 16.1.
.png)

