mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 14:13:38 +00:00
Auto merge of #9723 - Rageking8:fix-dupe-word-typos, r=llogiq
Fix dupe word typos changelog: fix some typos
This commit is contained in:
commit
ec9edbcdd4
@ -226,7 +226,7 @@ impl<'a, 'tcx> SigDropHelper<'a, 'tcx> {
|
||||
/// 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) {
|
||||
|
@ -711,7 +711,7 @@ impl core::ops::Add<u32> for EnumValue {
|
||||
}
|
||||
}
|
||||
|
||||
/// 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) {
|
||||
|
@ -10,7 +10,7 @@ fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
// 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 {
|
||||
|
@ -76,7 +76,7 @@ fn mut_range_bound_no_immediate_break() {
|
||||
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;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ LL | m = 2; // warning because it is not immediately followed by 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
|
||||
|
Loading…
Reference in New Issue
Block a user