Skip to content

Commit 4cb9f03

Browse files
committed
Make the assertion in Ident::new debug-only.
This fixes a perf regression introduced in rust-lang#140252.
1 parent dcecb99 commit 4cb9f03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_span/src/symbol.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2352,7 +2352,7 @@ impl Ident {
23522352
#[inline]
23532353
/// Constructs a new identifier from a symbol and a span.
23542354
pub fn new(name: Symbol, span: Span) -> Ident {
2355-
assert_ne!(name, kw::Empty);
2355+
debug_assert_ne!(name, kw::Empty);
23562356
Ident { name, span }
23572357
}
23582358

0 commit comments

Comments
 (0)