Skip to content

Commit b4fdf64

Browse files
committed
Inline first_token.
Because it's tiny and hot.
1 parent bd23d68 commit b4fdf64

File tree

1 file changed

+1
-0
lines changed
  • compiler/rustc_lexer/src

1 file changed

+1
-0
lines changed

compiler/rustc_lexer/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ pub fn strip_shebang(input: &str) -> Option<usize> {
221221
}
222222

223223
/// Parses the first token from the provided input string.
224+
#[inline]
224225
pub fn first_token(input: &str) -> Token {
225226
debug_assert!(!input.is_empty());
226227
Cursor::new(input).advance_token()

0 commit comments

Comments
 (0)