diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 9cc0109069e..6165941eb3d 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -169,7 +169,8 @@ pub struct AssertParamIsCopy { /// Implementations of `Clone` for primitive types. /// /// Implementations that cannot be described in Rust -/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc_middle. +/// are implemented in `traits::SelectionContext::copy_clone_conditions()` +/// in `rustc_trait_selection`. mod impls { use super::Clone; diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 9b13766e9c4..35bceaa25c3 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -759,7 +759,8 @@ impl Unpin for *mut T {} /// Implementations of `Copy` for primitive types. /// /// Implementations that cannot be described in Rust -/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc_middle. +/// are implemented in `traits::SelectionContext::copy_clone_conditions()` +/// in `rustc_trait_selection`. mod copy_impls { use super::Copy; diff --git a/src/libcore/raw.rs b/src/libcore/raw.rs index 9bbdce94a06..cb0fb8795e5 100644 --- a/src/libcore/raw.rs +++ b/src/libcore/raw.rs @@ -6,7 +6,8 @@ //! They can be used as targets of transmutes in unsafe code for manipulating //! the raw representations directly. //! -//! Their definition should always match the ABI defined in `rustc_target::abi`. +//! Their definition should always match the ABI defined in +//! `rustc_middle::ty::layout`. /// The representation of a trait object like `&SomeTrait`. /// diff --git a/src/librustc_infer/infer/lexical_region_resolve/graphviz.rs b/src/librustc_infer/infer/lexical_region_resolve/graphviz.rs index c43d8107b2f..141424fc0c7 100644 --- a/src/librustc_infer/infer/lexical_region_resolve/graphviz.rs +++ b/src/librustc_infer/infer/lexical_region_resolve/graphviz.rs @@ -1,5 +1,5 @@ //! This module provides linkage between libgraphviz traits and -//! `rustc_middle::middle::typeck::infer::region_constraints`, generating a +//! `rustc_trait_selection::infer::region_constraints`, generating a //! rendering of the graph represented by the list of `Constraint` //! instances (which make up the edges of the graph), as well as the //! origin for each constraint (which are attached to the labels on diff --git a/src/librustc_mir/borrow_check/region_infer/mod.rs b/src/librustc_mir/borrow_check/region_infer/mod.rs index 125110216aa..303f43b0ee2 100644 --- a/src/librustc_mir/borrow_check/region_infer/mod.rs +++ b/src/librustc_mir/borrow_check/region_infer/mod.rs @@ -202,7 +202,7 @@ pub(crate) enum Cause { /// /// For more information about this translation, see /// `InferCtxt::process_registered_region_obligations` and -/// `InferCtxt::type_must_outlive` in `rustc_middle::infer::outlives`. +/// `InferCtxt::type_must_outlive` in `rustc_infer::infer::InferCtxt`. #[derive(Clone, Debug)] pub struct TypeTest<'tcx> { /// The type `T` that must outlive the region. diff --git a/src/librustc_mir/borrow_check/type_check/mod.rs b/src/librustc_mir/borrow_check/type_check/mod.rs index cedae94ab89..a118fe2db71 100644 --- a/src/librustc_mir/borrow_check/type_check/mod.rs +++ b/src/librustc_mir/borrow_check/type_check/mod.rs @@ -1053,7 +1053,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { /// regions which are extracted and stored as having occurred at /// `locations`. /// - /// **Any `rustc_middle::infer` operations that might generate region + /// **Any `rustc_infer::infer` operations that might generate region /// constraints should occur within this method so that those /// constraints can be properly localized!** fn fully_perform_op( diff --git a/src/librustc_passes/region.rs b/src/librustc_passes/region.rs index 290454c1673..485480d020f 100644 --- a/src/librustc_passes/region.rs +++ b/src/librustc_passes/region.rs @@ -27,8 +27,8 @@ pub struct Context { /// of the innermost fn body. Each fn forms its own disjoint tree /// in the region hierarchy. These fn bodies are themselves /// arranged into a tree. See the "Modeling closures" section of - /// the README in `infer::region_constraints` for more - /// details. + /// the README in `rustc_trait_selection::infer::region_constraints` + /// for more details. root_id: Option, /// The scope that contains any new variables declared, plus its depth in diff --git a/src/librustc_passes/stability.rs b/src/librustc_passes/stability.rs index 6fbfdbdc4e9..ad81aa30685 100644 --- a/src/librustc_passes/stability.rs +++ b/src/librustc_passes/stability.rs @@ -438,7 +438,7 @@ fn new_index(tcx: TyCtxt<'tcx>) -> Index<'tcx> { // If the `-Z force-unstable-if-unmarked` flag is passed then we provide // a parent stability annotation which indicates that this is private // with the `rustc_private` feature. This is intended for use when - // compiling librustc_middle crates themselves so we can leverage crates.io + // compiling `librustc_*` crates themselves so we can leverage crates.io // while maintaining the invariant that all sysroot crates are unstable // by default and are unable to be used. if tcx.sess.opts.debugging_opts.force_unstable_if_unmarked { diff --git a/src/librustc_session/filesearch.rs b/src/librustc_session/filesearch.rs index 4310c508443..4347512eda0 100644 --- a/src/librustc_session/filesearch.rs +++ b/src/librustc_session/filesearch.rs @@ -143,8 +143,8 @@ fn find_libdir(sysroot: &Path) -> Cow<'static, str> { // FIXME: This is a quick hack to make the rustc binary able to locate // Rust libraries in Linux environments where libraries might be installed // to lib64/lib32. This would be more foolproof by basing the sysroot off - // of the directory where librustc_middle is located, rather than where the rustc - // binary is. + // of the directory where `librustc_driver` is located, rather than + // where the rustc binary is. // If --libdir is set during configuration to the value other than // "lib" (i.e., non-default), this value is used (see issue #16552). diff --git a/src/librustc_session/lint.rs b/src/librustc_session/lint.rs index 07075863ae3..b16d513d923 100644 --- a/src/librustc_session/lint.rs +++ b/src/librustc_session/lint.rs @@ -195,7 +195,7 @@ pub enum BuiltinLintDiagnostics { } /// Lints that are buffered up early on in the `Session` before the -/// `LintLevels` is calculated. These are later passed to `librustc_middle`. +/// `LintLevels` is calculated. #[derive(PartialEq)] pub struct BufferedEarlyLint { /// The span of code that we are linting on. @@ -207,7 +207,8 @@ pub struct BufferedEarlyLint { /// The `NodeId` of the AST node that generated the lint. pub node_id: NodeId, - /// A lint Id that can be passed to `rustc_session::lint::Lint::from_parser_lint_id`. + /// A lint Id that can be passed to + /// `rustc_lint::early::EarlyContextAndPass::check_id`. pub lint_id: LintId, /// Customization of the `DiagnosticBuilder<'_>` for the lint. diff --git a/src/librustc_trait_selection/traits/project.rs b/src/librustc_trait_selection/traits/project.rs index 3057b79547d..e4ca7d4cde7 100644 --- a/src/librustc_trait_selection/traits/project.rs +++ b/src/librustc_trait_selection/traits/project.rs @@ -1010,7 +1010,7 @@ fn assemble_candidates_from_impls<'cx, 'tcx>( // type. // // NOTE: This should be kept in sync with the similar code in - // `rustc_middle::ty::instance::resolve_associated_item()`. + // `rustc_ty::instance::resolve_associated_item()`. let node_item = assoc_ty_def(selcx, impl_data.impl_def_id, obligation.predicate.item_def_id) .map_err(|ErrorReported| ())?; diff --git a/src/librustc_traits/implied_outlives_bounds.rs b/src/librustc_traits/implied_outlives_bounds.rs index 0f432245ff7..33ecbe72a8c 100644 --- a/src/librustc_traits/implied_outlives_bounds.rs +++ b/src/librustc_traits/implied_outlives_bounds.rs @@ -1,5 +1,6 @@ //! Provider for the `implied_outlives_bounds` query. -//! Do not call this query directory. See [`rustc_middle::traits::query::implied_outlives_bounds`]. +//! Do not call this query directory. See +//! [`rustc_trait_selection::traits::query::type_op::implied_outlives_bounds`]. use rustc_hir as hir; use rustc_infer::infer::canonical::{self, Canonical}; diff --git a/src/librustc_ty/instance.rs b/src/librustc_ty/instance.rs index e845cc9a158..677e373f2f4 100644 --- a/src/librustc_ty/instance.rs +++ b/src/librustc_ty/instance.rs @@ -118,7 +118,7 @@ fn resolve_associated_item<'tcx>( // Since this is a trait item, we need to see if the item is either a trait default item // or a specialization because we can't resolve those unless we can `Reveal::All`. // NOTE: This should be kept in sync with the similar code in - // `rustc_middle::traits::project::assemble_candidates_from_impls()`. + // `rustc_trait_selection::traits::project::assemble_candidates_from_impls()`. let eligible = if leaf_def.is_final() { // Non-specializable items are always projectable. true diff --git a/src/libstd/alloc.rs b/src/libstd/alloc.rs index bbbf6f7251e..9840cfa4304 100644 --- a/src/libstd/alloc.rs +++ b/src/libstd/alloc.rs @@ -289,10 +289,10 @@ pub fn rust_oom(layout: Layout) -> ! { pub mod __default_lib_allocator { use super::{GlobalAlloc, Layout, System}; // These magic symbol names are used as a fallback for implementing the - // `__rust_alloc` etc symbols (see `src/liballoc/alloc.rs) when there is + // `__rust_alloc` etc symbols (see `src/liballoc/alloc.rs`) when there is // no `#[global_allocator]` attribute. - // for symbol names src/librustc_middle/middle/allocator.rs + // for symbol names src/librustc_ast/expand/allocator.rs // for signatures src/librustc_allocator/lib.rs // linkage directives are provided as part of the current compiler allocator