Rollup merge of #88230 - steffahn:a_an, r=oli-obk
Fix typos “a”→“an” Fix typos in comments; found using a regex to find some easy instance of incorrect usage of a vs. an. While automation was used to find these, every change was checked manually. Changes in submodules get separate PRs: * https://github.com/rust-lang/stdarch/pull/1201 * https://github.com/rust-lang/cargo/pull/9821 * https://github.com/rust-lang/miri/pull/1874 * https://github.com/rust-lang/rls/pull/1746 * https://github.com/rust-analyzer/rust-analyzer/pull/9984 _folks @ rust-analyzer are fast at merging…_ * https://github.com/rust-analyzer/rust-analyzer/pull/9985 * https://github.com/rust-analyzer/rust-analyzer/pull/9987 * https://github.com/rust-analyzer/rust-analyzer/pull/9989 _For `clippy`, I don’t know if the changes should better better be moved to a PR to the original repo._ <hr> This has some overlap with #88226, but neither is a strict superset of the other. If you want multiple commits, I can split it up; in that case, make sure to suggest a criterion for splitting.
This commit is contained in:
commit
5cf025f076
150 changed files with 234 additions and 234 deletions
|
@ -668,7 +668,7 @@ enum NameBindingKind<'a> {
|
|||
}
|
||||
|
||||
impl<'a> NameBindingKind<'a> {
|
||||
/// Is this a name binding of a import?
|
||||
/// Is this a name binding of an import?
|
||||
fn is_import(&self) -> bool {
|
||||
matches!(*self, NameBindingKind::Import { .. })
|
||||
}
|
||||
|
@ -3065,7 +3065,7 @@ impl<'a> Resolver<'a> {
|
|||
self.extern_prelude.get(&ident).map_or(true, |entry| entry.introduced_by_item);
|
||||
// Only suggest removing an import if both bindings are to the same def, if both spans
|
||||
// aren't dummy spans. Further, if both bindings are imports, then the ident must have
|
||||
// been introduced by a item.
|
||||
// been introduced by an item.
|
||||
let should_remove_import = duplicate
|
||||
&& !has_dummy_span
|
||||
&& ((new_binding.is_extern_crate() || old_binding.is_extern_crate()) || from_item);
|
||||
|
@ -3160,7 +3160,7 @@ impl<'a> Resolver<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// This function adds a suggestion to remove a unnecessary binding from an import that is
|
||||
/// This function adds a suggestion to remove an unnecessary binding from an import that is
|
||||
/// nested. In the following example, this function will be invoked to remove the `a` binding
|
||||
/// in the second use statement:
|
||||
///
|
||||
|
@ -3212,7 +3212,7 @@ impl<'a> Resolver<'a> {
|
|||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
} else {
|
||||
// Remove the entire line if we cannot extend the span back, this indicates a
|
||||
// Remove the entire line if we cannot extend the span back, this indicates an
|
||||
// `issue_52891::{self}` case.
|
||||
err.span_suggestion(
|
||||
import.use_span_with_attributes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue