chore: Fix typos in 'compiler' (batch 2)

This commit is contained in:
Alexander Cyon 2024-09-02 07:50:22 +02:00
parent 78d5c04d9c
commit 00de006f22
No known key found for this signature in database
34 changed files with 54 additions and 54 deletions

View file

@ -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 {
#[primary_span]
#[label]

View file

@ -445,7 +445,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
}
}
Scope::DeriveHelpersCompat => {
// FIXME: Try running this logic eariler, to allocate name bindings for
// FIXME: Try running this logic earlier, to allocate name bindings for
// legacy derive helpers when creating an attribute invocation with
// following derives. Legacy derive helpers are not common, so it shouldn't
// affect performance. It should also allow to remove the `derives`

View file

@ -133,7 +133,7 @@ pub(crate) enum NoConstantGenericsReason {
/// Const arguments are only allowed to use generic parameters when:
/// - `feature(generic_const_exprs)` is enabled
/// or
/// - the const argument is a sole const generic paramater, i.e. `foo::<{ N }>()`
/// - the const argument is a sole const generic parameter, i.e. `foo::<{ N }>()`
///
/// If neither of the above are true then this is used as the cause.
NonTrivialConstArg,
@ -4486,7 +4486,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
/// There are a few places that we need to resolve an anon const but we did not parse an
/// anon const so cannot provide an `&'ast AnonConst`. Right now this is just unbraced
/// const arguments that were parsed as type arguments, and `legact_const_generics` which
/// const arguments that were parsed as type arguments, and `legacy_const_generics` which
/// parse as normal function argument expressions. To avoid duplicating the code for resolving
/// an anon const we have this function which lets the caller manually call `resolve_expr` or
/// `smart_resolve_path`.

View file

@ -417,7 +417,7 @@ pub(crate) fn attrs_to_preprocessed_links(attrs: &[ast::Attribute]) -> Vec<Box<s
parse_links(&doc)
}
/// Similiar version of `markdown_links` from rustdoc.
/// Similar version of `markdown_links` from rustdoc.
/// This will collect destination links and display text if exists.
fn parse_links<'md>(doc: &'md str) -> Vec<Box<str>> {
let mut broken_link_callback = |link: BrokenLink<'md>| Some((link.reference, "".into()));