mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
Fix outdated crate names in compiler docs
Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged. Also fix incorrect file paths.
This commit is contained in:
parent
b01026de46
commit
0019ca9141
@ -1,3 +1,3 @@
|
||||
//! Definitions shared by macros / syntax extensions and e.g. librustc_middle.
|
||||
//! Definitions shared by macros / syntax extensions and e.g. `rustc_middle`.
|
||||
|
||||
pub mod allocator;
|
||||
|
@ -59,7 +59,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
|
||||
/// Requirements for a `StableHashingContext` to be used in this crate.
|
||||
/// This is a hack to allow using the `HashStable_Generic` derive macro
|
||||
/// instead of implementing everything in librustc_middle.
|
||||
/// instead of implementing everything in `rustc_middle`.
|
||||
pub trait HashStableContext: rustc_span::HashStableContext {
|
||||
fn hash_attr(&mut self, _: &ast::Attribute, hasher: &mut StableHasher);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ struct LoweringContext<'a, 'hir: 'a> {
|
||||
|
||||
/// HACK(Centril): there is a cyclic dependency between the parser and lowering
|
||||
/// if we don't have this function pointer. To avoid that dependency so that
|
||||
/// librustc_middle is independent of the parser, we use dynamic dispatch here.
|
||||
/// `rustc_middle` is independent of the parser, we use dynamic dispatch here.
|
||||
nt_to_tokenstream: NtToTokenstream,
|
||||
|
||||
/// Used to allocate HIR nodes.
|
||||
|
@ -1,6 +1,6 @@
|
||||
//! Codegen vtables and vtable accesses.
|
||||
//!
|
||||
//! See librustc_codegen_llvm/meth.rs for reference
|
||||
//! See `rustc_codegen_ssa/src/meth.rs` for reference.
|
||||
// FIXME dedup this logic between miri, cg_llvm and cg_clif
|
||||
|
||||
use crate::prelude::*;
|
||||
|
@ -19,7 +19,7 @@ pub struct Svh {
|
||||
impl Svh {
|
||||
/// Creates a new `Svh` given the hash. If you actually want to
|
||||
/// compute the SVH from some HIR, you want the `calculate_svh`
|
||||
/// function found in `librustc_incremental`.
|
||||
/// function found in `rustc_incremental`.
|
||||
pub fn new(hash: u64) -> Svh {
|
||||
Svh { hash }
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! # Feature gates
|
||||
//!
|
||||
//! This crate declares the set of past and present unstable features in the compiler.
|
||||
//! Feature gate checking itself is done in `librustc_ast_passes/feature_gate.rs`
|
||||
//! Feature gate checking itself is done in `rustc_ast_passes/src/feature_gate.rs`
|
||||
//! at the moment.
|
||||
//!
|
||||
//! Features are enabled in programs via the crate-level attributes of
|
||||
|
@ -9,7 +9,7 @@ use rustc_span::def_id::{DefPathHash, LocalDefId};
|
||||
|
||||
/// Requirements for a `StableHashingContext` to be used in this crate.
|
||||
/// This is a hack to allow using the `HashStable_Generic` derive macro
|
||||
/// instead of implementing everything in librustc_middle.
|
||||
/// instead of implementing everything in `rustc_middle`.
|
||||
pub trait HashStableContext:
|
||||
rustc_ast::HashStableContext + rustc_target::HashStableContext
|
||||
{
|
||||
|
@ -18,8 +18,8 @@ pub static WEAK_ITEMS_REFS: SyncLazy<StableMap<Symbol, LangItem>> = SyncLazy::ne
|
||||
map
|
||||
});
|
||||
|
||||
/// The `check_name` argument avoids the need for `librustc_hir` to depend on
|
||||
/// `librustc_session`.
|
||||
/// The `check_name` argument avoids the need for `rustc_hir` to depend on
|
||||
/// `rustc_session`.
|
||||
pub fn link_name<'a, F>(check_name: F, attrs: &'a [ast::Attribute]) -> Option<Symbol>
|
||||
where
|
||||
F: Fn(&'a ast::Attribute, Symbol) -> bool
|
||||
|
@ -2,7 +2,7 @@
|
||||
//!
|
||||
//! - **Type inference.** The type inference code can be found in the `infer` module;
|
||||
//! this code handles low-level equality and subtyping operations. The
|
||||
//! type check pass in the compiler is found in the `librustc_typeck` crate.
|
||||
//! type check pass in the compiler is found in the `rustc_typeck` crate.
|
||||
//!
|
||||
//! For more information about how rustc works, see the [rustc dev guide].
|
||||
//!
|
||||
|
@ -1,13 +1,13 @@
|
||||
//! Low-level Rust lexer.
|
||||
//!
|
||||
//! The idea with `librustc_lexer` is to make a reusable library,
|
||||
//! The idea with `rustc_lexer` is to make a reusable library,
|
||||
//! by separating out pure lexing and rustc-specific concerns, like spans,
|
||||
//! error reporting, and interning. So, rustc_lexer operates directly on `&str`,
|
||||
//! produces simple tokens which are a pair of type-tag and a bit of original text,
|
||||
//! and does not report errors, instead storing them as flags on the token.
|
||||
//!
|
||||
//! Tokens produced by this lexer are not yet ready for parsing the Rust syntax.
|
||||
//! For that see [`librustc_parse::lexer`], which converts this basic token stream
|
||||
//! For that see [`rustc_parse::lexer`], which converts this basic token stream
|
||||
//! into wide tokens used by actual parser.
|
||||
//!
|
||||
//! The purpose of this crate is to convert raw sources into a labeled sequence
|
||||
@ -17,7 +17,7 @@
|
||||
//! The main entity of this crate is the [`TokenKind`] enum which represents common
|
||||
//! lexeme types.
|
||||
//!
|
||||
//! [`librustc_parse::lexer`]: ../rustc_parse/lexer/index.html
|
||||
//! [`rustc_parse::lexer`]: ../rustc_parse/lexer/index.html
|
||||
// We want to be able to build this crate with a stable compiler, so no
|
||||
// `#![feature]` attributes should be added.
|
||||
|
||||
|
@ -2280,7 +2280,7 @@ declare_lint! {
|
||||
}
|
||||
|
||||
declare_lint_pass!(
|
||||
/// Check for used feature gates in `INCOMPLETE_FEATURES` in `librustc_feature/active.rs`.
|
||||
/// Check for used feature gates in `INCOMPLETE_FEATURES` in `rustc_feature/src/active.rs`.
|
||||
IncompleteFeatures => [INCOMPLETE_FEATURES]
|
||||
);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//! This module contains `HashStable` implementations for various data types
|
||||
//! from librustc_ast in no particular order.
|
||||
//! from `rustc_ast` in no particular order.
|
||||
|
||||
use crate::ich::StableHashingContext;
|
||||
|
||||
|
@ -46,7 +46,7 @@ static_assert_size!(InterpErrorInfo<'_>, 8);
|
||||
/// Packages the kind of error we got from the const code interpreter
|
||||
/// up with a Rust-level backtrace of where the error occurred.
|
||||
/// Thsese should always be constructed by calling `.into()` on
|
||||
/// a `InterpError`. In `librustc_mir::interpret`, we have `throw_err_*`
|
||||
/// a `InterpError`. In `rustc_mir::interpret`, we have `throw_err_*`
|
||||
/// macros for this.
|
||||
#[derive(Debug)]
|
||||
pub struct InterpErrorInfo<'tcx>(Box<InterpErrorInfoInner<'tcx>>);
|
||||
|
@ -3,7 +3,7 @@
|
||||
//! which makes a canonical query by replacing unbound inference
|
||||
//! variables and regions, so that results can be reused more broadly.
|
||||
//! The providers for the queries defined here can be found in
|
||||
//! `librustc_traits`.
|
||||
//! `rustc_traits`.
|
||||
|
||||
use crate::ich::StableHashingContext;
|
||||
use crate::infer::canonical::{Canonical, QueryResponse};
|
||||
|
@ -44,7 +44,7 @@ use std::ops::ControlFlow;
|
||||
/// This trait is implemented for every type that can be folded.
|
||||
/// Basically, every type that has a corresponding method in `TypeFolder`.
|
||||
///
|
||||
/// To implement this conveniently, use the derive macro located in librustc_macros.
|
||||
/// To implement this conveniently, use the derive macro located in `rustc_macros`.
|
||||
pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
|
||||
fn super_fold_with<F: TypeFolder<'tcx>>(self, folder: &mut F) -> Self;
|
||||
fn fold_with<F: TypeFolder<'tcx>>(self, folder: &mut F) -> Self {
|
||||
|
@ -80,7 +80,7 @@ impl BoundRegionKind {
|
||||
/// Defines the kinds of types.
|
||||
///
|
||||
/// N.B., if you change this, you'll probably want to change the corresponding
|
||||
/// AST structure in `librustc_ast/ast.rs` as well.
|
||||
/// AST structure in `rustc_ast/src/ast.rs` as well.
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, TyEncodable, TyDecodable, Debug)]
|
||||
#[derive(HashStable)]
|
||||
#[rustc_diagnostic_item = "TyKind"]
|
||||
@ -2116,7 +2116,7 @@ impl<'tcx> TyS<'tcx> {
|
||||
///
|
||||
/// Note that during type checking, we use an inference variable
|
||||
/// to represent the closure kind, because it has not yet been
|
||||
/// inferred. Once upvar inference (in `src/librustc_typeck/check/upvar.rs`)
|
||||
/// inferred. Once upvar inference (in `rustc_typeck/src/check/upvar.rs`)
|
||||
/// is complete, that type variable will be unified.
|
||||
pub fn to_opt_closure_kind(&self) -> Option<ty::ClosureKind> {
|
||||
match self.kind() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
//! This module provides linkage between RegionInferenceContext and
|
||||
//! librustc_graphviz traits, specialized to attaching borrowck analysis
|
||||
//! `rustc_graphviz` traits, specialized to attaching borrowck analysis
|
||||
//! data to rendered labels.
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
@ -128,7 +128,7 @@ impl<'a> StringReader<'a> {
|
||||
}
|
||||
|
||||
/// Turns simple `rustc_lexer::TokenKind` enum into a rich
|
||||
/// `librustc_ast::TokenKind`. This turns strings into interned
|
||||
/// `rustc_ast::TokenKind`. This turns strings into interned
|
||||
/// symbols and runs additional validation.
|
||||
fn cook_lexer_token(&self, token: rustc_lexer::TokenKind, start: BytePos) -> Option<TokenKind> {
|
||||
Some(match token {
|
||||
|
@ -26,7 +26,7 @@
|
||||
//! could not be instantiated because the current compilation session
|
||||
//! contained no `DefId` for thing that had been removed.
|
||||
//!
|
||||
//! `DepNode` definition happens in `librustc_middle` with the `define_dep_nodes!()` macro.
|
||||
//! `DepNode` definition happens in `rustc_middle` with the `define_dep_nodes!()` macro.
|
||||
//! This macro defines the `DepKind` enum and a corresponding `DepConstructor` enum. The
|
||||
//! `DepConstructor` enum links a `DepKind` to the parameters that are needed at runtime in order
|
||||
//! to construct a valid `DepNode` fingerprint.
|
||||
|
@ -6,7 +6,7 @@
|
||||
//! Paths in macros, imports, expressions, types, patterns are resolved here.
|
||||
//! Label and lifetime names are resolved here as well.
|
||||
//!
|
||||
//! Type-relative name resolution (methods, fields, associated items) happens in `librustc_typeck`.
|
||||
//! Type-relative name resolution (methods, fields, associated items) happens in `rustc_typeck`.
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||
#![feature(box_patterns)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
`librustc_target` contains some very low-level details that are
|
||||
`rustc_target` contains some very low-level details that are
|
||||
specific to different compilation targets and so forth.
|
||||
|
||||
For more information about how rustc works, see the [rustc dev guide].
|
||||
|
@ -28,5 +28,5 @@ pub mod spec;
|
||||
|
||||
/// Requirements for a `StableHashingContext` to be used in this crate.
|
||||
/// This is a hack to allow using the `HashStable_Generic` derive macro
|
||||
/// instead of implementing everything in librustc_middle.
|
||||
/// instead of implementing everything in `rustc_middle`.
|
||||
pub trait HashStableContext {}
|
||||
|
@ -3,7 +3,7 @@
|
||||
//! which makes a canonical query by replacing unbound inference
|
||||
//! variables and regions, so that results can be reused more broadly.
|
||||
//! The providers for the queries defined here can be found in
|
||||
//! `librustc_traits`.
|
||||
//! `rustc_traits`.
|
||||
|
||||
pub mod dropck_outlives;
|
||||
pub mod evaluate_obligation;
|
||||
|
Loading…
Reference in New Issue
Block a user