When code it marked as expect(dead_code) one of two things is typically true:
- The code is unused, in which case it should be removed.
- The code is used but in certain compilation configurations in which case
expect will produce a compiler warning when the code is actually used. These should be marked as allow or expect with appropriate cfg modifiers.
The exception is when code is unused only temporarily, but these cases should be very few and be addressed in the short term. I do not think we should keep marking code as expect(dead_code).