/// This will try to set the current suggestion (so it can be moved into the suggestions vec
/// later). If `allow_move_and_clone` is false, the suggestion *won't* be set -- this gives us
/// an opportunity to look for another type in the chain that will be trivially copyable.
- /// However, if we are at the the end of the chain, we want to accept whatever is there. (The
+ /// However, if we are at the end of the chain, we want to accept whatever is there. (The
/// suggestion won't actually be output, but the diagnostic message will be output, so the user
/// can determine the best way to handle the lint.)
fn try_setting_current_suggestion(&mut self, expr: &'tcx Expr<'_>, allow_move_and_clone: bool) {
}
}
-/// Attempts to read the given constant as though it were an an enum value.
+/// Attempts to read the given constant as though it were an enum value.
#[expect(clippy::cast_possible_truncation, clippy::cast_possible_wrap)]
pub fn read_explicit_enum_value(tcx: TyCtxt<'_>, id: DefId) -> Option<EnumValue> {
if let Ok(ConstValue::Scalar(Scalar::Int(value))) = tcx.const_eval_poly(id) {
}
}
- // Test for loop over implicitly implicitly adjusted `Iterator` with `if let` statement
+ // Test for loop over implicitly adjusted `Iterator` with `if let` statement
let y: Vec<Result<i32, i32>> = vec![];
for n in y.clone() {
if let Ok(n) = n {
let mut n = 3;
for i in n..10 {
if n == 4 {
- n = 1; // FIXME: warning because is is not immediately followed by break
+ n = 1; // FIXME: warning because it is not immediately followed by break
let _ = 2;
break;
}
error: attempt to mutate range bound within loop
--> $DIR/mut_range_bound.rs:79:13
|
-LL | n = 1; // FIXME: warning because is is not immediately followed by break
+LL | n = 1; // FIXME: warning because it is not immediately followed by break
| ^
|
= note: the range of the loop is unchanged