Skip to content

Commit 82b92b0

Browse files
committed
Auto merge of #121142 - GuillaumeGomez:rollup-5qmksjw, r=GuillaumeGomez
Rollup of 8 pull requests Successful merges: - #120449 (Document requirements for unsized {Rc,Arc}::from_raw) - #120505 (Fix BTreeMap's Cursor::remove_{next,prev}) - #120672 (std::thread update freebsd stack guard handling.) - #121088 (Implicitly enable evex512 if avx512 is enabled) - #121104 (Ignore unsized types when trying to determine the size of the original type) - #121107 (Fix msg for verbose suggestions with confusable capitalization) - #121113 (Continue compilation even if inherent impl checks fail) - #121120 (Add `ErrorGuaranteed` to `ast::LitKind::Err`, `token::LitKind::Err`.) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 4e2363e + 5f53aaf commit 82b92b0

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

clippy_lints/src/matches/match_same_arms.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ impl<'a> NormalizedPat<'a> {
295295
LitKind::Char(val) => Self::LitInt(val.into()),
296296
LitKind::Int(val, _) => Self::LitInt(val.get()),
297297
LitKind::Bool(val) => Self::LitBool(val),
298-
LitKind::Float(..) | LitKind::Err => Self::Wild,
298+
LitKind::Float(..) => Self::Wild,
299+
LitKind::Err(guar) => Self::Err(guar),
299300
},
300301
_ => Self::Wild,
301302
},

clippy_lints/src/redundant_type_annotations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ impl LateLintPass<'_> for RedundantTypeAnnotations {
200200
span_lint(cx, REDUNDANT_TYPE_ANNOTATIONS, local.span, "redundant type annotation");
201201
}
202202
},
203-
LitKind::Err => (),
203+
LitKind::Err(_) => (),
204204
LitKind::ByteStr(..) => {
205205
// We only lint if the type annotation is an array type (e.g. &[u8; 4]).
206206
// If instead it is a slice (e.g. &[u8]) it may not be redundant, so we

clippy_lints/src/utils/author.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl<'a, 'tcx> PrintVisitor<'a, 'tcx> {
279279
match lit.value.node {
280280
LitKind::Bool(val) => kind!("Bool({val:?})"),
281281
LitKind::Char(c) => kind!("Char({c:?})"),
282-
LitKind::Err => kind!("Err"),
282+
LitKind::Err(_) => kind!("Err"),
283283
LitKind::Byte(b) => kind!("Byte({b})"),
284284
LitKind::Int(i, suffix) => {
285285
let int_ty = match suffix {

clippy_utils/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ pub fn lit_to_mir_constant<'tcx>(lit: &LitKind, ty: Option<Ty<'tcx>>) -> Constan
286286
_ => bug!(),
287287
},
288288
LitKind::Bool(b) => Constant::Bool(b),
289-
LitKind::Err => Constant::Err,
289+
LitKind::Err(_) => Constant::Err,
290290
}
291291
}
292292

tests/ui/match_str_case_mismatch.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ error: this `match` arm has a differing case than its expression
1717
LL | "~!@#$%^&*()-_=+Foo" => {},
1818
| ^^^^^^^^^^^^^^^^^^^^
1919
|
20-
help: consider changing the case of this arm to respect `to_ascii_lowercase`
20+
help: consider changing the case of this arm to respect `to_ascii_lowercase` (notice the capitalization difference)
2121
|
2222
LL | "~!@#$%^&*()-_=+foo" => {},
2323
| ~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)