Rename vector patterns to array patterns

Closes #17765.
Tweak ‘discriminant value already exists’ error message

Closes #15524.
Give a more descriptive error when marking non-test items as #[test]

Closes #14772.
auto merge of #17785 : P1start/rust/diagnostics, r=alexcrichton

Closes #17765.
Closes #15524.
Closes #14772.