-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Fix typos in 'compiler' (batch 2) #129877
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -289,7 +289,7 @@ fn can_cast( | |
|
||
#[derive(Default)] | ||
struct SimplifyToExp { | ||
transfrom_kinds: Vec<TransfromKind>, | ||
transform_kinds: Vec<TransformKind>, | ||
} | ||
|
||
#[derive(Clone, Copy)] | ||
|
@@ -302,17 +302,17 @@ enum ExpectedTransformKind<'tcx, 'a> { | |
Cast { place: &'a Place<'tcx>, ty: Ty<'tcx> }, | ||
} | ||
|
||
enum TransfromKind { | ||
enum TransformKind { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Completely understand if this should be reverted, since it is not just a doc change but changing the code... |
||
Same, | ||
Cast, | ||
} | ||
|
||
impl From<ExpectedTransformKind<'_, '_>> for TransfromKind { | ||
impl From<ExpectedTransformKind<'_, '_>> for TransformKind { | ||
fn from(compare_type: ExpectedTransformKind<'_, '_>) -> Self { | ||
match compare_type { | ||
ExpectedTransformKind::Same(_) => TransfromKind::Same, | ||
ExpectedTransformKind::SameByEq { .. } => TransfromKind::Same, | ||
ExpectedTransformKind::Cast { .. } => TransfromKind::Cast, | ||
ExpectedTransformKind::Same(_) => TransformKind::Same, | ||
ExpectedTransformKind::SameByEq { .. } => TransformKind::Same, | ||
ExpectedTransformKind::Cast { .. } => TransformKind::Cast, | ||
} | ||
} | ||
} | ||
|
@@ -475,7 +475,7 @@ impl<'tcx> SimplifyMatch<'tcx> for SimplifyToExp { | |
} | ||
} | ||
} | ||
self.transfrom_kinds = expected_transform_kinds.into_iter().map(|c| c.into()).collect(); | ||
self.transform_kinds = expected_transform_kinds.into_iter().map(|c| c.into()).collect(); | ||
Some(()) | ||
} | ||
|
||
|
@@ -493,13 +493,13 @@ impl<'tcx> SimplifyMatch<'tcx> for SimplifyToExp { | |
let (_, first) = targets.iter().next().unwrap(); | ||
let first = &bbs[first]; | ||
|
||
for (t, s) in iter::zip(&self.transfrom_kinds, &first.statements) { | ||
for (t, s) in iter::zip(&self.transform_kinds, &first.statements) { | ||
match (t, &s.kind) { | ||
(TransfromKind::Same, _) => { | ||
(TransformKind::Same, _) => { | ||
patch.add_statement(parent_end, s.kind.clone()); | ||
} | ||
( | ||
TransfromKind::Cast, | ||
TransformKind::Cast, | ||
StatementKind::Assign(box (lhs, Rvalue::Use(Operand::Constant(f_c)))), | ||
) => { | ||
let operand = Operand::Copy(Place::from(discr_local)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -894,7 +894,7 @@ pub(crate) struct LendingIteratorReportError { | |
} | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(resolve_anonymous_livetime_non_gat_report_error)] | ||
#[diag(resolve_anonymous_lifetime_non_gat_report_error)] | ||
pub(crate) struct AnonymousLivetimeNonGatReportError { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is also a typo: should be |
||
#[primary_span] | ||
#[label] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert?