From b4fdf648eab9afc797fe5e2d9e30a9660f23d68d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 27 Jul 2022 13:50:48 +1000 Subject: Inline `first_token`. Because it's tiny and hot. --- compiler/rustc_lexer/src/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_lexer/src/lib.rs') diff --git a/compiler/rustc_lexer/src/lib.rs b/compiler/rustc_lexer/src/lib.rs index a41e0374f41..32260913491 100644 --- a/compiler/rustc_lexer/src/lib.rs +++ b/compiler/rustc_lexer/src/lib.rs @@ -221,6 +221,7 @@ pub fn strip_shebang(input: &str) -> Option { } /// Parses the first token from the provided input string. +#[inline] pub fn first_token(input: &str) -> Token { debug_assert!(!input.is_empty()); Cursor::new(input).advance_token() -- cgit 1.4.1-3-g733a5