1
Fork 0

more clippy fixes

This commit is contained in:
Matthias Krüger 2021-11-07 10:33:27 +01:00
parent 88b4ea8fb6
commit 5c454551da
27 changed files with 140 additions and 184 deletions

View file

@ -210,10 +210,10 @@ impl<'tcx> CheckConstVisitor<'tcx> {
required_gates.iter().copied().filter(|&g| !features.enabled(g)).collect();
match missing_gates.as_slice() {
&[] => struct_span_err!(tcx.sess, span, E0744, "{}", msg).emit(),
[] => struct_span_err!(tcx.sess, span, E0744, "{}", msg).emit(),
&[missing_primary, ref missing_secondary @ ..] => {
let mut err = feature_err(&tcx.sess.parse_sess, missing_primary, span, &msg);
[missing_primary, ref missing_secondary @ ..] => {
let mut err = feature_err(&tcx.sess.parse_sess, *missing_primary, span, &msg);
// If multiple feature gates would be required to enable this expression, include
// them as help messages. Don't emit a separate error for each missing feature gate.