Skip to content

Commit 74b23f9

Browse files
authored
Rollup merge of #83980 - pierwill:fix-compiler-librustc-names, r=davidtwco
Fix outdated crate names in compiler docs Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged.
2 parents 461297e + 0019ca9 commit 74b23f9

File tree

23 files changed

+27
-27
lines changed

23 files changed

+27
-27
lines changed

Diff for: compiler/rustc_ast/src/expand/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
//! Definitions shared by macros / syntax extensions and e.g. librustc_middle.
1+
//! Definitions shared by macros / syntax extensions and e.g. `rustc_middle`.
22
33
pub mod allocator;

Diff for: compiler/rustc_ast/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
5959

6060
/// Requirements for a `StableHashingContext` to be used in this crate.
6161
/// This is a hack to allow using the `HashStable_Generic` derive macro
62-
/// instead of implementing everything in librustc_middle.
62+
/// instead of implementing everything in `rustc_middle`.
6363
pub trait HashStableContext: rustc_span::HashStableContext {
6464
fn hash_attr(&mut self, _: &ast::Attribute, hasher: &mut StableHasher);
6565
}

Diff for: compiler/rustc_ast_lowering/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct LoweringContext<'a, 'hir: 'a> {
9393

9494
/// HACK(Centril): there is a cyclic dependency between the parser and lowering
9595
/// if we don't have this function pointer. To avoid that dependency so that
96-
/// librustc_middle is independent of the parser, we use dynamic dispatch here.
96+
/// `rustc_middle` is independent of the parser, we use dynamic dispatch here.
9797
nt_to_tokenstream: NtToTokenstream,
9898

9999
/// Used to allocate HIR nodes.

Diff for: compiler/rustc_codegen_cranelift/src/vtable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Codegen vtables and vtable accesses.
22
//!
3-
//! See librustc_codegen_llvm/meth.rs for reference
3+
//! See `rustc_codegen_ssa/src/meth.rs` for reference.
44
// FIXME dedup this logic between miri, cg_llvm and cg_clif
55

66
use crate::prelude::*;

Diff for: compiler/rustc_data_structures/src/svh.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub struct Svh {
1919
impl Svh {
2020
/// Creates a new `Svh` given the hash. If you actually want to
2121
/// compute the SVH from some HIR, you want the `calculate_svh`
22-
/// function found in `librustc_incremental`.
22+
/// function found in `rustc_incremental`.
2323
pub fn new(hash: u64) -> Svh {
2424
Svh { hash }
2525
}

Diff for: compiler/rustc_feature/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! # Feature gates
22
//!
33
//! This crate declares the set of past and present unstable features in the compiler.
4-
//! Feature gate checking itself is done in `librustc_ast_passes/feature_gate.rs`
4+
//! Feature gate checking itself is done in `rustc_ast_passes/src/feature_gate.rs`
55
//! at the moment.
66
//!
77
//! Features are enabled in programs via the crate-level attributes of

Diff for: compiler/rustc_hir/src/stable_hash_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_span::def_id::{DefPathHash, LocalDefId};
99

1010
/// Requirements for a `StableHashingContext` to be used in this crate.
1111
/// This is a hack to allow using the `HashStable_Generic` derive macro
12-
/// instead of implementing everything in librustc_middle.
12+
/// instead of implementing everything in `rustc_middle`.
1313
pub trait HashStableContext:
1414
rustc_ast::HashStableContext + rustc_target::HashStableContext
1515
{

Diff for: compiler/rustc_hir/src/weak_lang_items.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pub static WEAK_ITEMS_REFS: SyncLazy<StableMap<Symbol, LangItem>> = SyncLazy::ne
1818
map
1919
});
2020

21-
/// The `check_name` argument avoids the need for `librustc_hir` to depend on
22-
/// `librustc_session`.
21+
/// The `check_name` argument avoids the need for `rustc_hir` to depend on
22+
/// `rustc_session`.
2323
pub fn link_name<'a, F>(check_name: F, attrs: &'a [ast::Attribute]) -> Option<Symbol>
2424
where
2525
F: Fn(&'a ast::Attribute, Symbol) -> bool

Diff for: compiler/rustc_infer/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! - **Type inference.** The type inference code can be found in the `infer` module;
44
//! this code handles low-level equality and subtyping operations. The
5-
//! type check pass in the compiler is found in the `librustc_typeck` crate.
5+
//! type check pass in the compiler is found in the `rustc_typeck` crate.
66
//!
77
//! For more information about how rustc works, see the [rustc dev guide].
88
//!

Diff for: compiler/rustc_lexer/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//! Low-level Rust lexer.
22
//!
3-
//! The idea with `librustc_lexer` is to make a reusable library,
3+
//! The idea with `rustc_lexer` is to make a reusable library,
44
//! by separating out pure lexing and rustc-specific concerns, like spans,
55
//! error reporting, and interning. So, rustc_lexer operates directly on `&str`,
66
//! produces simple tokens which are a pair of type-tag and a bit of original text,
77
//! and does not report errors, instead storing them as flags on the token.
88
//!
99
//! Tokens produced by this lexer are not yet ready for parsing the Rust syntax.
10-
//! For that see [`librustc_parse::lexer`], which converts this basic token stream
10+
//! For that see [`rustc_parse::lexer`], which converts this basic token stream
1111
//! into wide tokens used by actual parser.
1212
//!
1313
//! The purpose of this crate is to convert raw sources into a labeled sequence
@@ -17,7 +17,7 @@
1717
//! The main entity of this crate is the [`TokenKind`] enum which represents common
1818
//! lexeme types.
1919
//!
20-
//! [`librustc_parse::lexer`]: ../rustc_parse/lexer/index.html
20+
//! [`rustc_parse::lexer`]: ../rustc_parse/lexer/index.html
2121
// We want to be able to build this crate with a stable compiler, so no
2222
// `#![feature]` attributes should be added.
2323

Diff for: compiler/rustc_lint/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2280,7 +2280,7 @@ declare_lint! {
22802280
}
22812281

22822282
declare_lint_pass!(
2283-
/// Check for used feature gates in `INCOMPLETE_FEATURES` in `librustc_feature/active.rs`.
2283+
/// Check for used feature gates in `INCOMPLETE_FEATURES` in `rustc_feature/src/active.rs`.
22842284
IncompleteFeatures => [INCOMPLETE_FEATURES]
22852285
);
22862286

Diff for: compiler/rustc_middle/src/ich/impls_syntax.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! This module contains `HashStable` implementations for various data types
2-
//! from librustc_ast in no particular order.
2+
//! from `rustc_ast` in no particular order.
33
44
use crate::ich::StableHashingContext;
55

Diff for: compiler/rustc_middle/src/mir/interpret/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static_assert_size!(InterpErrorInfo<'_>, 8);
4646
/// Packages the kind of error we got from the const code interpreter
4747
/// up with a Rust-level backtrace of where the error occurred.
4848
/// Thsese should always be constructed by calling `.into()` on
49-
/// a `InterpError`. In `librustc_mir::interpret`, we have `throw_err_*`
49+
/// a `InterpError`. In `rustc_mir::interpret`, we have `throw_err_*`
5050
/// macros for this.
5151
#[derive(Debug)]
5252
pub struct InterpErrorInfo<'tcx>(Box<InterpErrorInfoInner<'tcx>>);

Diff for: compiler/rustc_middle/src/traits/query.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! which makes a canonical query by replacing unbound inference
44
//! variables and regions, so that results can be reused more broadly.
55
//! The providers for the queries defined here can be found in
6-
//! `librustc_traits`.
6+
//! `rustc_traits`.
77
88
use crate::ich::StableHashingContext;
99
use crate::infer::canonical::{Canonical, QueryResponse};

Diff for: compiler/rustc_middle/src/ty/fold.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use std::ops::ControlFlow;
4444
/// This trait is implemented for every type that can be folded.
4545
/// Basically, every type that has a corresponding method in `TypeFolder`.
4646
///
47-
/// To implement this conveniently, use the derive macro located in librustc_macros.
47+
/// To implement this conveniently, use the derive macro located in `rustc_macros`.
4848
pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
4949
fn super_fold_with<F: TypeFolder<'tcx>>(self, folder: &mut F) -> Self;
5050
fn fold_with<F: TypeFolder<'tcx>>(self, folder: &mut F) -> Self {

Diff for: compiler/rustc_middle/src/ty/sty.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl BoundRegionKind {
8080
/// Defines the kinds of types.
8181
///
8282
/// N.B., if you change this, you'll probably want to change the corresponding
83-
/// AST structure in `librustc_ast/ast.rs` as well.
83+
/// AST structure in `rustc_ast/src/ast.rs` as well.
8484
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, TyEncodable, TyDecodable, Debug)]
8585
#[derive(HashStable)]
8686
#[rustc_diagnostic_item = "TyKind"]
@@ -2116,7 +2116,7 @@ impl<'tcx> TyS<'tcx> {
21162116
///
21172117
/// Note that during type checking, we use an inference variable
21182118
/// to represent the closure kind, because it has not yet been
2119-
/// inferred. Once upvar inference (in `src/librustc_typeck/check/upvar.rs`)
2119+
/// inferred. Once upvar inference (in `rustc_typeck/src/check/upvar.rs`)
21202120
/// is complete, that type variable will be unified.
21212121
pub fn to_opt_closure_kind(&self) -> Option<ty::ClosureKind> {
21222122
match self.kind() {

Diff for: compiler/rustc_mir/src/borrow_check/region_infer/graphviz.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! This module provides linkage between RegionInferenceContext and
2-
//! librustc_graphviz traits, specialized to attaching borrowck analysis
2+
//! `rustc_graphviz` traits, specialized to attaching borrowck analysis
33
//! data to rendered labels.
44
55
use std::borrow::Cow;

Diff for: compiler/rustc_parse/src/lexer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl<'a> StringReader<'a> {
128128
}
129129

130130
/// Turns simple `rustc_lexer::TokenKind` enum into a rich
131-
/// `librustc_ast::TokenKind`. This turns strings into interned
131+
/// `rustc_ast::TokenKind`. This turns strings into interned
132132
/// symbols and runs additional validation.
133133
fn cook_lexer_token(&self, token: rustc_lexer::TokenKind, start: BytePos) -> Option<TokenKind> {
134134
Some(match token {

Diff for: compiler/rustc_query_system/src/dep_graph/dep_node.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
//! could not be instantiated because the current compilation session
2727
//! contained no `DefId` for thing that had been removed.
2828
//!
29-
//! `DepNode` definition happens in `librustc_middle` with the `define_dep_nodes!()` macro.
29+
//! `DepNode` definition happens in `rustc_middle` with the `define_dep_nodes!()` macro.
3030
//! This macro defines the `DepKind` enum and a corresponding `DepConstructor` enum. The
3131
//! `DepConstructor` enum links a `DepKind` to the parameters that are needed at runtime in order
3232
//! to construct a valid `DepNode` fingerprint.

Diff for: compiler/rustc_resolve/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//! Paths in macros, imports, expressions, types, patterns are resolved here.
77
//! Label and lifetime names are resolved here as well.
88
//!
9-
//! Type-relative name resolution (methods, fields, associated items) happens in `librustc_typeck`.
9+
//! Type-relative name resolution (methods, fields, associated items) happens in `rustc_typeck`.
1010
1111
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1212
#![feature(box_patterns)]

Diff for: compiler/rustc_target/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
`librustc_target` contains some very low-level details that are
1+
`rustc_target` contains some very low-level details that are
22
specific to different compilation targets and so forth.
33

44
For more information about how rustc works, see the [rustc dev guide].

Diff for: compiler/rustc_target/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ pub mod spec;
2828

2929
/// Requirements for a `StableHashingContext` to be used in this crate.
3030
/// This is a hack to allow using the `HashStable_Generic` derive macro
31-
/// instead of implementing everything in librustc_middle.
31+
/// instead of implementing everything in `rustc_middle`.
3232
pub trait HashStableContext {}

Diff for: compiler/rustc_trait_selection/src/traits/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! which makes a canonical query by replacing unbound inference
44
//! variables and regions, so that results can be reused more broadly.
55
//! The providers for the queries defined here can be found in
6-
//! `librustc_traits`.
6+
//! `rustc_traits`.
77
88
pub mod dropck_outlives;
99
pub mod evaluate_obligation;

0 commit comments

Comments
 (0)