Skip to content
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 some comments #138270

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/type_check/liveness/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> {
Err(ErrorGuaranteed { .. }) => {
// We don't run dropck on HIR, and dropck looks inside fields of
// types, so there's no guarantee that it succeeds. We also
// can't rely on the the `ErrorGuaranteed` from `fully_perform` here
// can't rely on the `ErrorGuaranteed` from `fully_perform` here
// because it comes from delay_span_bug.
//
// Do this inside of a probe because we don't particularly care (or want)
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_hir/src/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ pub trait Visitor<'v>: Sized {
/// See the doc comments on [`Ty`] for an explanation of what it means for a type to be
/// ambiguous.
///
/// The [`Visitor::visit_infer`] method should be overriden in order to handle infer vars.
/// The [`Visitor::visit_infer`] method should be overridden in order to handle infer vars.
fn visit_ty(&mut self, t: &'v Ty<'v, AmbigArg>) -> Self::Result {
walk_ty(self, t)
}
Expand All @@ -374,7 +374,7 @@ pub trait Visitor<'v>: Sized {
/// See the doc comments on [`ConstArg`] for an explanation of what it means for a const to be
/// ambiguous.
///
/// The [`Visitor::visit_infer`] method should be overriden in order to handle infer vars.
/// The [`Visitor::visit_infer`] method should be overridden in order to handle infer vars.
fn visit_const_arg(&mut self, c: &'v ConstArg<'v, AmbigArg>) -> Self::Result {
walk_ambig_const_arg(self, c)
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/default_could_be_derived.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl<'tcx> LateLintPass<'tcx> for DefaultCouldBeDerived {
return;
}

// At least one of the fields with a default value have been overriden in
// At least one of the fields with a default value have been overridden in
// the `Default` implementation. We suggest removing it and relying on `..`
// instead.
let any_default_field_given =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ have default field values.
## Lints

When manually implementing the `Default` trait for a type that has default
field values, if any of these are overriden in the impl the
field values, if any of these are overridden in the impl the
`default_overrides_default_fields` lint will trigger. This lint is in place
to avoid surprising diverging behavior between `S { .. }` and
`S::default()`, where using the same type in both ways could result in
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/check-cfg/allow-same-level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
// It should work, but due to interactions between how #[cfg]s are
// expanded, the lint machinery and the check-cfg impl, we
// miss the #[allow], althrough we probably shoudln't.
// miss the #[allow], althrough we probably shouldn't.
//
// cf. https://github.com/rust-lang/rust/issues/124735
//
Expand Down
Loading