inlines contains in bitflags!

Closes #17210
auto merge of #17254 : gamazeps/rust/issue17210, r=alexcrichton

Closes #17210