9650a4168f
This patch improves the readability of some of the code by using if-let-chains. Also, make use of the `add_feature_diagnostics` function.