This is the opposite of temporary

We probably should tweak our integration with rustc_lexer

and we might tweak the interface and scope of rustc_lexer (things like lowering an integer literal to an integer value ideally should be in rustc_lexer), but the overall structure should be roughly as it is today

And what would you want to tweak in our integration with rustc_lexer today?

At least not dropping errors on the floor. Quite probably something else: the current contents of lexer.rs is basically the minimal diff which was possible to apply to thrown away our previous bespoke lexer and replace it with rustc_lexer. For example,

immediately jumps at me as something we might want to change at either our or rustc_lexer side

I don't have time right now to investigate what exactly needs to be changed and how :D

Yeah, I am currently working on that not-dropping-errors-on-the-floor issue. But didn't know we had another lexer implementation it the past. Regarding that UNDERSCORE token, I'll also look at it, but after I am done with errors preserving.

And by "lowering an integer literal to an integer value" do you mean parsing the integer token string representation like here? I also wonder whether this is legal at all (I mean there may be some rust-specific features of int literals that str::parse::<usize>() may not understand...)