Skip to content

Commit 0bed23b

Browse files
committed
Inline integer_lit and float_lit.
Because they are sometimes hot and each have a single call site.
1 parent 432abd8 commit 0bed23b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_ast/src/util/literal.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,13 @@ fn filtered_float_lit(
281281
})
282282
}
283283

284+
#[inline]
284285
fn float_lit(symbol: Symbol, suffix: Option<Symbol>) -> Result<LitKind, LitError> {
285286
debug!("float_lit: {:?}, {:?}", symbol, suffix);
286287
filtered_float_lit(strip_underscores(symbol), suffix, 10)
287288
}
288289

290+
#[inline]
289291
fn integer_lit(symbol: Symbol, suffix: Option<Symbol>) -> Result<LitKind, LitError> {
290292
debug!("integer_lit: {:?}, {:?}", symbol, suffix);
291293
let symbol = strip_underscores(symbol);

0 commit comments

Comments
 (0)