Constants used in range patterns should not be considered unused
auto merge of #18493 : jakub-/rust/issue-18464, r=alexcrichton

Fixes #18464.