The story of how my first PR to the Rust Compiler was merged.

After a series of git commits and code reviews, the desired error message E0621 was obtained -with the aim of simplifying the lifetime usage in Rust. The first time I used Git which was more than a year ago, I was terrified of the word *merge conflicts* but by now, I am proud to admit that I am getting the hang of things.

Luckily this time, I came across only two merge conflicts while I tried to merge my changes with the main repository. The first one was a change in the organization of tables which stored the Type of an argument i.e. the variable tables here.

if let Some(tables) = self.in_progress_tables {                        body.arguments                        
.filter_map(|(index, arg)| {
let ty = tables.borrow().node_id_to_type(;

The second was related to the moving the PolyFnSig out of TyFnDef.ty::TyFnDef(_, _, sig) would now be let sig = ret_ty.fn_sig(self.tcx) where ret_ty is the corresponding Function return type. This code snippet is disabling E0621 for the case where the anonymous region is in the return type of the function or trait signature or inherent functions.

And then this ❤️

It’s a lovely feeling 💃. Thank you for reading 😃

Show your support

Clapping shows how much you appreciated GeekyTwoShoes11’s story.