From b33e3a6af513c3f19f989f1ed302361770f8c671 Mon Sep 17 00:00:00 2001 From: lcnr Date: Mon, 26 Sep 2022 13:00:29 +0200 Subject: [PATCH 1/2] rustc_typeck to rustc_hir_analysis --- crates/hir-ty/src/autoderef.rs | 2 +- crates/hir-ty/src/infer.rs | 2 +- crates/hir-ty/src/infer/coerce.rs | 2 +- crates/hir-ty/src/method_resolution.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/hir-ty/src/autoderef.rs b/crates/hir-ty/src/autoderef.rs index 344036dd81..e106c4c2cf 100644 --- a/crates/hir-ty/src/autoderef.rs +++ b/crates/hir-ty/src/autoderef.rs @@ -1,7 +1,7 @@ //! In certain situations, rust automatically inserts derefs as necessary: for //! example, field accesses `foo.bar` still work when `foo` is actually a //! reference to a type with the field `bar`. This is an approximation of the -//! logic in rustc (which lives in librustc_typeck/check/autoderef.rs). +//! logic in rustc (which lives in rustc_hir_analysis/check/autoderef.rs). use std::sync::Arc; diff --git a/crates/hir-ty/src/infer.rs b/crates/hir-ty/src/infer.rs index e37763e8ea..9dbeba4f9f 100644 --- a/crates/hir-ty/src/infer.rs +++ b/crates/hir-ty/src/infer.rs @@ -2,7 +2,7 @@ //! the type of each expression and pattern. //! //! For type inference, compare the implementations in rustc (the various -//! check_* methods in librustc_typeck/check/mod.rs are a good entry point) and +//! check_* methods in rustc_hir_analysis/check/mod.rs are a good entry point) and //! IntelliJ-Rust (org.rust.lang.core.types.infer). Our entry point for //! inference here is the `infer` function, which infers the types of all //! expressions in a given function. diff --git a/crates/hir-ty/src/infer/coerce.rs b/crates/hir-ty/src/infer/coerce.rs index f54440bf5b..8df25c83c6 100644 --- a/crates/hir-ty/src/infer/coerce.rs +++ b/crates/hir-ty/src/infer/coerce.rs @@ -3,7 +3,7 @@ //! like going from `&Vec` to `&[T]`. //! //! See and -//! `librustc_typeck/check/coercion.rs`. +//! `rustc_hir_analysis/check/coercion.rs`. use std::{iter, sync::Arc}; diff --git a/crates/hir-ty/src/method_resolution.rs b/crates/hir-ty/src/method_resolution.rs index 41fcef73d9..cc21990d55 100644 --- a/crates/hir-ty/src/method_resolution.rs +++ b/crates/hir-ty/src/method_resolution.rs @@ -1,7 +1,7 @@ //! This module is concerned with finding methods that a given type provides. //! For details about how this works in rustc, see the method lookup page in the //! [rustc guide](https://rust-lang.github.io/rustc-guide/method-lookup.html) -//! and the corresponding code mostly in librustc_typeck/check/method/probe.rs. +//! and the corresponding code mostly in rustc_hir_analysis/check/method/probe.rs. use std::{iter, ops::ControlFlow, sync::Arc}; use arrayvec::ArrayVec; From 2e263283fa0e35fc60fdaee74a611ecf6f0a5363 Mon Sep 17 00:00:00 2001 From: Petr Portnov Date: Sun, 2 Oct 2022 21:40:39 +0300 Subject: [PATCH 2/2] Fix duplicate usage of `a` article. This fixes a typo first appearing in #94624 in which test-macro diagnostic uses "a" article twice. Since I searched sources for " a a " sequences, I also fixed the same issue in a few source files where I found it. Signed-off-by: Petr Portnov --- crates/ide-db/src/imports/merge_imports.rs | 2 +- crates/rust-analyzer/src/bin/logger.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ide-db/src/imports/merge_imports.rs b/crates/ide-db/src/imports/merge_imports.rs index 7fb4b90e6d..371d642c15 100644 --- a/crates/ide-db/src/imports/merge_imports.rs +++ b/crates/ide-db/src/imports/merge_imports.rs @@ -225,7 +225,7 @@ fn path_cmp_short(a: &ast::Path, b: &ast::Path) -> Ordering { } /// Compares two paths, if one ends earlier than the other the has_tl parameters decide which is -/// greater as a a path that has a tree list should be greater, while one that just ends without +/// greater as a path that has a tree list should be greater, while one that just ends without /// a tree list should be considered less. pub(super) fn use_tree_path_cmp( a: &ast::Path, diff --git a/crates/rust-analyzer/src/bin/logger.rs b/crates/rust-analyzer/src/bin/logger.rs index 298814af5a..ac10721d95 100644 --- a/crates/rust-analyzer/src/bin/logger.rs +++ b/crates/rust-analyzer/src/bin/logger.rs @@ -132,7 +132,7 @@ where let ext = span.extensions(); - // `FormattedFields` is a a formatted representation of the span's + // `FormattedFields` is a formatted representation of the span's // fields, which is stored in its extensions by the `fmt` layer's // `new_span` method. The fields will have been formatted // by the same field formatter that's provided to the event