Minor follow-up after renaming librustc(_middle)

This commit is contained in:
Yuki Okushi 2020-04-03 19:03:13 +09:00
parent 548afdbe1a
commit 99e0d8ed79
No known key found for this signature in database
GPG Key ID: B0986C85C0E2DAA1
14 changed files with 23 additions and 18 deletions

View File

@ -169,7 +169,8 @@ pub struct AssertParamIsCopy<T: Copy + ?Sized> {
/// 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;

View File

@ -759,7 +759,8 @@ impl<T: ?Sized> 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;

View File

@ -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`.
///

View File

@ -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

View File

@ -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.

View File

@ -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<R>(

View File

@ -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<hir::ItemLocalId>,
/// The scope that contains any new variables declared, plus its depth in

View File

@ -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 {

View File

@ -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).

View File

@ -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.

View File

@ -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| ())?;

View File

@ -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};

View File

@ -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

View File

@ -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