Rollup merge of #110153 - DaniPopes:compiler-typos, r=Nilstrieb
Fix typos in compiler I ran [`typos -w compiler`](https://github.com/crate-ci/typos) to fix typos in the `compiler` directory. Refs #110150
This commit is contained in:
commit
331e7c3659
70 changed files with 138 additions and 136 deletions
|
@ -2,7 +2,7 @@
|
|||
//! Clippy.
|
||||
|
||||
use crate::lints::{
|
||||
BadOptAccessDiag, DefaultHashTypesDiag, DiagOutOfImpl, LintPassByHand, NonExistantDocKeyword,
|
||||
BadOptAccessDiag, DefaultHashTypesDiag, DiagOutOfImpl, LintPassByHand, NonExistentDocKeyword,
|
||||
QueryInstability, TyQualified, TykindDiag, TykindKind, UntranslatableDiag,
|
||||
};
|
||||
use crate::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
|
||||
|
@ -334,7 +334,7 @@ impl<'tcx> LateLintPass<'tcx> for ExistingDocKeyword {
|
|||
cx.emit_spanned_lint(
|
||||
EXISTING_DOC_KEYWORD,
|
||||
attr.span,
|
||||
NonExistantDocKeyword { keyword },
|
||||
NonExistentDocKeyword { keyword },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ impl LateLintPass<'_> for Diagnostics {
|
|||
}
|
||||
|
||||
declare_tool_lint! {
|
||||
/// The `bad_opt_access` lint detects accessing options by field instad of
|
||||
/// The `bad_opt_access` lint detects accessing options by field instead of
|
||||
/// the wrapper function.
|
||||
pub rustc::BAD_OPT_ACCESS,
|
||||
Deny,
|
||||
|
|
|
@ -25,7 +25,7 @@ declare_lint! {
|
|||
///
|
||||
/// fn main() {
|
||||
/// #[warn(let_underscore_drop)]
|
||||
/// // SomeStuct is dropped immediately instead of at end of scope,
|
||||
/// // SomeStruct is dropped immediately instead of at end of scope,
|
||||
/// // so "Dropping SomeStruct" is printed before "end of main".
|
||||
/// // The order of prints would be reversed if SomeStruct was bound to
|
||||
/// // a name (such as "_foo").
|
||||
|
|
|
@ -3,7 +3,7 @@ use crate::{
|
|||
fluent_generated as fluent,
|
||||
late::unerased_lint_store,
|
||||
lints::{
|
||||
DeprecatedLintName, IgnoredUnlessCrateSpecified, OverruledAtributeLint,
|
||||
DeprecatedLintName, IgnoredUnlessCrateSpecified, OverruledAttributeLint,
|
||||
RenamedOrRemovedLint, RenamedOrRemovedLintSuggestion, UnknownLint, UnknownLintSuggestion,
|
||||
},
|
||||
};
|
||||
|
@ -612,7 +612,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
|
|||
self.emit_spanned_lint(
|
||||
FORBIDDEN_LINT_GROUPS,
|
||||
src.span().into(),
|
||||
OverruledAtributeLint {
|
||||
OverruledAttributeLint {
|
||||
overruled: src.span(),
|
||||
lint_level: level.as_str(),
|
||||
lint_source: src.name(),
|
||||
|
|
|
@ -806,9 +806,9 @@ pub struct TyQualified {
|
|||
pub struct LintPassByHand;
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_non_existant_doc_keyword)]
|
||||
#[diag(lint_non_existent_doc_keyword)]
|
||||
#[help]
|
||||
pub struct NonExistantDocKeyword {
|
||||
pub struct NonExistentDocKeyword {
|
||||
pub keyword: Symbol,
|
||||
}
|
||||
|
||||
|
@ -875,7 +875,7 @@ impl AddToDiagnostic for NonBindingLetSub {
|
|||
// levels.rs
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_overruled_attribute)]
|
||||
pub struct OverruledAtributeLint<'a> {
|
||||
pub struct OverruledAttributeLint<'a> {
|
||||
#[label]
|
||||
pub overruled: Span,
|
||||
pub lint_level: &'a str,
|
||||
|
@ -947,7 +947,7 @@ pub struct CStringPtr {
|
|||
|
||||
// multiple_supertrait_upcastable.rs
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_multple_supertrait_upcastable)]
|
||||
#[diag(lint_multiple_supertrait_upcastable)]
|
||||
pub struct MultipleSupertraitUpcastable {
|
||||
pub ident: Ident,
|
||||
}
|
||||
|
@ -1422,7 +1422,7 @@ pub struct UnusedResult<'a> {
|
|||
pub ty: Ty<'a>,
|
||||
}
|
||||
|
||||
// FIXME(davidtwco): this isn't properly translatable becauses of the
|
||||
// FIXME(davidtwco): this isn't properly translatable because of the
|
||||
// pre/post strings
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_unused_closure)]
|
||||
|
@ -1433,7 +1433,7 @@ pub struct UnusedClosure<'a> {
|
|||
pub post: &'a str,
|
||||
}
|
||||
|
||||
// FIXME(davidtwco): this isn't properly translatable becauses of the
|
||||
// FIXME(davidtwco): this isn't properly translatable because of the
|
||||
// pre/post strings
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_unused_generator)]
|
||||
|
@ -1444,7 +1444,7 @@ pub struct UnusedGenerator<'a> {
|
|||
pub post: &'a str,
|
||||
}
|
||||
|
||||
// FIXME(davidtwco): this isn't properly translatable becauses of the pre/post
|
||||
// FIXME(davidtwco): this isn't properly translatable because of the pre/post
|
||||
// strings
|
||||
pub struct UnusedDef<'a, 'b> {
|
||||
pub pre: &'a str,
|
||||
|
|
|
@ -250,7 +250,7 @@ impl EarlyLintPass for NonAsciiIdents {
|
|||
let latin_augmented_script_set = AugmentedScriptSet::for_char('A');
|
||||
script_states.insert(latin_augmented_script_set, ScriptSetUsage::Verified);
|
||||
|
||||
let mut has_suspicous = false;
|
||||
let mut has_suspicious = false;
|
||||
for (symbol, &sp) in symbols.iter() {
|
||||
let symbol_str = symbol.as_str();
|
||||
for ch in symbol_str.chars() {
|
||||
|
@ -278,14 +278,14 @@ impl EarlyLintPass for NonAsciiIdents {
|
|||
if !is_potential_mixed_script_confusable_char(ch) {
|
||||
ScriptSetUsage::Verified
|
||||
} else {
|
||||
has_suspicous = true;
|
||||
has_suspicious = true;
|
||||
ScriptSetUsage::Suspicious(vec![ch], sp)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if has_suspicous {
|
||||
if has_suspicious {
|
||||
let verified_augmented_script_sets = script_states
|
||||
.iter()
|
||||
.flat_map(|(k, v)| match v {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue