Skip to content

Commit e403d51

Browse files
authored
Change rustc::* to rustc_middle::* (#798)
1 parent 3078d38 commit e403d51

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

src/diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ The possible values of [`Applicability`][appl] are:
459459

460460
## Lints
461461

462-
The compiler linting infrastructure is defined in the [`rustc::lint`][rlint]
462+
The compiler linting infrastructure is defined in the [`rustc_middle::lint`][rlint]
463463
module.
464464

465465
[rlint]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/lint/index.html

src/diagnostics/lintstore.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Unfortunately, a lot of the documentation we have refers to both of these as jus
1515

1616
First, we have the lint declarations themselves: this is where the name and default lint level and
1717
other metadata come from. These are normally defined by way of the [`declare_lint!`] macro, which
18-
boils down to a static with type `&rustc::lint::Lint`. We lint against direct declarations without
19-
the use of the macro today (though this may change in the future, as the macro is somewhat unwieldy
20-
to add new fields to, like all macros by example).
18+
boils down to a static with type `&rustc_session::lint::Lint`. We lint against direct declarations
19+
without the use of the macro today (though this may change in the future, as the macro is somewhat
20+
unwieldy to add new fields to, like all macros by example).
2121

2222
Lint declarations don't carry any "state" - they are merely global identifers and descriptions of
2323
lints. We assert at runtime that they are not registered twice (by lint name).
@@ -55,9 +55,9 @@ internally.
5555
Note, these include both rustc-internal lints, and the traditional lints, like, for example the dead
5656
code lint.
5757

58-
These are primarily described in two places: `rustc::lint::builtin` and `rustc_lint::builtin`. The
59-
first provides the definitions for the lints themselves, and the latter provides the lint pass
60-
definitions (and implementations).
58+
These are primarily described in two places: `rustc_session::lint::builtin` and
59+
`rustc_lint::builtin`. The first provides the definitions for the lints themselves,
60+
and the latter provides the lint pass definitions (and implementations).
6161

6262
The internal lint registration happens in the [`rustc_lint::register_builtins`] function, along with
6363
the [`rustc_lint::register_internals`] function. More generally, the LintStore "constructor"

src/memory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ of the more Rust-ic "pull" style (think the `Iterator` trait).
8282

8383
Thread-local storage and interning are used a lot through the compiler to reduce
8484
duplication while also preventing a lot of the ergonomic issues due to many
85-
pervasive lifetimes. The [`rustc::ty::tls`][tls] module is used to access these
85+
pervasive lifetimes. The [`rustc_middle::ty::tls`][tls] module is used to access these
8686
thread-locals, although you should rarely need to touch it.
8787

8888
[tls]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/tls/index.html

src/mir/visitor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The MIR visitor is a convenient tool for traversing the MIR and either
44
looking for things or making changes to it. The visitor traits are
5-
defined in [the `rustc::mir::visit` module][m-v] – there are two of
5+
defined in [the `rustc_middle::mir::visit` module][m-v] – there are two of
66
them, generated via a single macro: `Visitor` (which operates on a
77
`&Mir` and gives back shared references) and `MutVisitor` (which
88
operates on a `&mut Mir` and gives back mutable references).
@@ -45,7 +45,7 @@ terminators and removes their `unwind` successors.
4545

4646
## Traversal
4747

48-
In addition the visitor, [the `rustc::mir::traversal` module][t]
48+
In addition the visitor, [the `rustc_middle::mir::traversal` module][t]
4949
contains useful functions for walking the MIR CFG in
5050
[different standard orders][traversal] (e.g. pre-order, reverse
5151
post-order, and so forth).

src/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,11 @@ the name `'tcx`, which means that something is tied to the lifetime of the
276276

277277
Types are really important in Rust, and they form the core of a lot of compiler
278278
analyses. The main type (in the compiler) that represents types (in the user's
279-
program) is [`rustc::ty::Ty`][ty]. This is so important that we have a whole chapter
279+
program) is [`rustc_middle::ty::Ty`][ty]. This is so important that we have a whole chapter
280280
on [`ty::Ty`][ty], but for now, we just want to mention that it exists and is the way
281281
`rustc` represents types!
282282

283-
Also note that the `rustc::ty` module defines the `TyCtxt` struct we mentioned before.
283+
Also note that the `rustc_middle::ty` module defines the `TyCtxt` struct we mentioned before.
284284

285285
[ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.Ty.html
286286

src/ty.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ quite a few modules and types for `Ty` in the compiler ([Ty documentation][ty]).
1010

1111
[ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/index.html
1212

13-
The specific `Ty` we are referring to is [`rustc::ty::Ty`][ty_ty] (and not
13+
The specific `Ty` we are referring to is [`rustc_middle::ty::Ty`][ty_ty] (and not
1414
[`rustc_hir::Ty`][hir_ty]). The distinction is important, so we will discuss it first before going
1515
into the details of `ty::Ty`.
1616

@@ -107,7 +107,7 @@ or `fn(i32) -> i32` (with type aliases fully expanded).
107107

108108
## `ty::Ty` implementation
109109

110-
[`rustc::ty::Ty`][ty_ty] is actually a type alias to [`&TyS`][tys].
110+
[`rustc_middle::ty::Ty`][ty_ty] is actually a type alias to [`&TyS`][tys].
111111
This type, which is short for "Type Structure", is where the main functionality is located.
112112
You can ignore `TyS` struct in general; you will basically never access it explicitly.
113113
We always pass it by reference using the `Ty` alias.

0 commit comments

Comments
 (0)