Skip to content

Commit 7e432c4

Browse files
committed
Auto merge of rust-lang#140880 - nnethercote:Ident-new-debug-assert, r=oli-obk
Make the assertion in `Ident::new` debug-only. This fixes a perf regression introduced in rust-lang#140252. r? `@oli-obk`
2 parents bfb44c8 + 4cb9f03 commit 7e432c4

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)