Use internal_error! instead of assert_debug!

This commit is contained in:
snobee 2025-01-15 20:50:50 -08:00
parent d4e558d327
commit 78ba0ca701
No known key found for this signature in database
GPG key ID: ABF756C92D69FDF1

View file

@ -335,10 +335,9 @@ fn annotate_module(loaded: &mut LoadedModule) -> String {
let mut file_progress = 0;
for (position, edit) in edits {
debug_assert!(
file_progress <= position,
"Module definitions are out of order"
);
if file_progress > position {
internal_error!("Module definitions are out of order");
};
buffer.push_str(&src[file_progress..position]);
buffer.push_str(&edit);