about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorKai Luo <gluokai@gmail.com>2023-01-09 23:09:18 +0800
committerKai Luo <gluokai@gmail.com>2023-01-09 23:09:18 +0800
commit8333e5cf5e4a37852774993a5a2398c8a0891239 (patch)
treeb2f1074e479bd9fdc63547f77e133c55040da60d /library/std/src
parent04a697502fbb3a69fe5dbeb0b3babf6f1e67711f (diff)
Add comments
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/personality/dwarf/eh.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/personality/dwarf/eh.rs b/library/std/src/personality/dwarf/eh.rs
index 1e71da95a30..4a98c36f42c 100644
--- a/library/std/src/personality/dwarf/eh.rs
+++ b/library/std/src/personality/dwarf/eh.rs
@@ -102,6 +102,8 @@ pub unsafe fn find_eh_action(lsda: *const u8, context: &EHContext<'_>) -> Result
                             (action_table as *mut u8).offset(cs_action_entry as isize - 1);
                         let mut action_reader = DwarfReader::new(action_record);
                         let ttype_index = action_reader.read_sleb128();
+                        // Normally, if ttype_index < 0, meaning the catch type is exception specification.
+                        // Since we only care about if ttype_index is zero, so casting ttype_index to u64 makes sense.
                         return Ok(interpret_cs_action(ttype_index as u64, lpad));
                     }
                 }