Representation methods of assertions that can cause ICE

I'm in the process of generating some statistics to gain insights into the ICE issues. Currently, I'm looking into the distribution of assertions within the compiler/ subdirectory (starting with rustc_). As I progressed, it seems that assertions are defined in various ways throughout the code. Based on what I've found so far, I'm curious if there are any other types besides the following:

  • Number of bug!() occurrences
  • Number of panic!() occurrences
  • Number of delay_span_bug() occurrences
  • Number of span_bug!() occurrences
  • Number of .expect() occurrences
  • Number of assertions declared in messages.ftl
1 Like

there are also other panic macros like unreachable. Also note unwrap in addition to expect. Another potential source of panics is indexing.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.