Skip to content

Commit f2cdf49

Browse files
committed
replace _ with - in path names (for consistency)
1 parent abef3cd commit f2cdf49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+119
-91
lines changed

book.toml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,40 @@ cache-timeout = 90000
5757
warning-policy = "error"
5858

5959
[output.html.redirect]
60+
"/borrow_check.html" = "borrow-check.html"
61+
"/borrow_check/drop_check.html" = "borrow-check/drop-check.html"
62+
"/borrow_check/moves_and_initialization.html" = "borrow-check/moves-and-initialization.html"
63+
"/borrow_check/moves_and_initialization/move_paths.html" = "borrow-check/moves-and-initialization/move-paths.html"
64+
"/borrow_check/opaque-types-region-inference-restrictions.html" = "borrow-check/opaque-types-region-inference-restrictions.html"
65+
"/borrow_check/region_inference.html" = "borrow-check/region-inference.html"
66+
"/borrow_check/region_inference/closure_constraints.html" = "borrow-check/region-inference/closure-constraints.html"
67+
"/borrow_check/region_inference/constraint_propagation.html" = "borrow-check/region-inference/constraint-propagation.html"
68+
"/borrow_check/region_inference/error_reporting.html" = "borrow-check/region-inference/error-reporting.html"
69+
"/borrow_check/region_inference/lifetime_parameters.html" = "borrow-check/region-inference/lifetime-parameters.html"
70+
"/borrow_check/region_inference/member_constraints.html" = "borrow-check/region-inference/member-constraints.html"
71+
"/borrow_check/region_inference/placeholders_and_universes.html" = "borrow-check/region-inference/placeholders-and-universes.html"
72+
"/borrow_check/two_phase_borrows.html" = "borrow-check/two-phase-borrows.html"
73+
"/borrow_check/type_check.html" = "borrow-check/type-check.html"
6074
"/compiletest.html" = "tests/compiletest.html"
61-
"/diagnostics/sessiondiagnostic.html" = "diagnostic-structs.html"
6275
"/diagnostics/diagnostic-codes.html" = "error-codes.html"
76+
"/diagnostics/sessiondiagnostic.html" = "diagnostic-structs.html"
77+
"/early_late_parameters.html" = "early-late-parameters.html"
78+
"/generic_parameters_summary.html" = "generic-parameters-summary.html"
79+
"/implementing_new_features.html" = "implementing-new-features.html"
6380
"/miri.html" = "const-eval/interpret.html"
81+
"/profiling/with_perf.html" = "profiling/with-perf.html"
82+
"/profiling/with_rustc_perf.html" = "profiling/with-rustc-perf.html"
83+
"/profiling/wpa_profiling.html" = "profiling/wpa-profiling.html"
84+
"/rustc-driver/external-rustc-drivers.html" = "rustc-driver/external-rustc-drivers.html"
85+
"/stabilization_guide.html" = "stabilization-guide.html"
86+
"/stabilization_report_template.html" = "stabilization-report-template.html"
6487
"/tests/fuchsia.html" = "ecosystem-test-jobs/fuchsia.html"
6588
"/tests/headers.html" = "directives.html"
6689
"/tests/integration.html" = "ecosystem.html"
6790
"/tests/rust-for-linux.html" = "ecosystem-test-jobs/rust-for-linux.html"
91+
"/ty_module/binders.html" = "ty-module/binders.html"
92+
"/ty_module/early_binder.html" = "ty-module/early-binder.html"
93+
"/ty_module/generic_arguments.html" = "ty-module/generic-arguments.html"
94+
"/ty_module/instantiating_binders.html" = "ty-module/instantiating-binders.html"
95+
"/ty_module/param_ty_const_regions.html" = "ty-module/param-ty-const-regions.html"
96+
"/typing_parameter_envs.html" = "typing-parameter-envs.html"

src/SUMMARY.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
- [Debugging the compiler](./compiler-debugging.md)
4040
- [Using the tracing/logging instrumentation](./tracing.md)
4141
- [Profiling the compiler](./profiling.md)
42-
- [with the linux perf tool](./profiling/with_perf.md)
43-
- [with Windows Performance Analyzer](./profiling/wpa_profiling.md)
44-
- [with the Rust benchmark suite](./profiling/with_rustc_perf.md)
42+
- [with the linux perf tool](./profiling/with-perf.md)
43+
- [with Windows Performance Analyzer](./profiling/wpa-profiling.md)
44+
- [with the Rust benchmark suite](./profiling/with-rustc-perf.md)
4545
- [crates.io dependencies](./crates-io.md)
4646

4747
# Contributing to Rust
@@ -51,11 +51,11 @@
5151
- [Using Git](./git.md)
5252
- [Mastering @rustbot](./rustbot.md)
5353
- [Walkthrough: a typical contribution](./walkthrough.md)
54-
- [Implementing new language features](./implementing_new_features.md)
54+
- [Implementing new language features](./implementing-new-features.md)
5555
- [Stability guarantees](./stability-guarantees.md)
5656
- [Stability attributes](./stability.md)
57-
- [Stabilizing language features](./stabilization_guide.md)
58-
- [Stabilization report template](./stabilization_report_template.md)
57+
- [Stabilizing language features](./stabilization-guide.md)
58+
- [Stabilization report template](./stabilization-report-template.md)
5959
- [Feature Gates](./feature-gates.md)
6060
- [Coding conventions](./conventions.md)
6161
- [Procedures for breaking changes](./bug-fix-procedure.md)
@@ -154,17 +154,17 @@
154154
# Analysis
155155

156156
- [Prologue](./part-4-intro.md)
157-
- [Generic parameter definitions](./generic_parameters_summary.md)
158-
- [`EarlyBinder` and instantiating parameters](./ty_module/early_binder.md)
159-
- [Binders and Higher ranked regions](./ty_module/binders.md)
160-
- [Instantiating binders](./ty_module/instantiating_binders.md)
161-
- [Early vs Late bound parameters](./early_late_parameters.md)
157+
- [Generic parameter definitions](./generic-parameters-summary.md)
158+
- [`EarlyBinder` and instantiating parameters](./ty-module/early-binder.md)
159+
- [Binders and Higher ranked regions](./ty-module/binders.md)
160+
- [Instantiating binders](./ty-module/instantiating-binders.md)
161+
- [Early vs Late bound parameters](./early-late-parameters.md)
162162
- [The `ty` module: representing types](./ty.md)
163-
- [ADTs and Generic Arguments](./ty_module/generic_arguments.md)
164-
- [Parameter types/consts/regions](./ty_module/param_ty_const_regions.md)
163+
- [ADTs and Generic Arguments](./ty-module/generic-arguments.md)
164+
- [Parameter types/consts/regions](./ty-module/param-ty-const-regions.md)
165165
- [`TypeFolder` and `TypeFoldable`](./ty-fold.md)
166166
- [Aliases and Normalization](./normalization.md)
167-
- [Typing/Param Envs](./typing_parameter_envs.md)
167+
- [Typing/Param Envs](./typing-parameter-envs.md)
168168
- [Type inference](./type-inference.md)
169169
- [Trait solving](./traits/resolution.md)
170170
- [Higher-ranked trait bounds](./traits/hrtb.md)
@@ -197,25 +197,25 @@
197197
- [Opaque types](./opaque-types-type-alias-impl-trait.md)
198198
- [Inference details](./opaque-types-impl-trait-inference.md)
199199
- [Return Position Impl Trait In Trait](./return-position-impl-trait-in-trait.md)
200-
- [Region inference restrictions](./borrow_check/opaque-types-region-inference-restrictions.md)
200+
- [Region inference restrictions](./borrow-check/opaque-types-region-inference-restrictions.md)
201201
- [Const condition checking](./effects.md)
202202
- [Pattern and exhaustiveness checking](./pat-exhaustive-checking.md)
203203
- [Unsafety checking](./unsafety-checking.md)
204204
- [MIR dataflow](./mir/dataflow.md)
205205
- [Drop elaboration](./mir/drop-elaboration.md)
206-
- [The borrow checker](./borrow_check.md)
207-
- [Tracking moves and initialization](./borrow_check/moves_and_initialization.md)
208-
- [Move paths](./borrow_check/moves_and_initialization/move_paths.md)
209-
- [MIR type checker](./borrow_check/type_check.md)
210-
- [Drop check](./borrow_check/drop_check.md)
211-
- [Region inference](./borrow_check/region_inference.md)
212-
- [Constraint propagation](./borrow_check/region_inference/constraint_propagation.md)
213-
- [Lifetime parameters](./borrow_check/region_inference/lifetime_parameters.md)
214-
- [Member constraints](./borrow_check/region_inference/member_constraints.md)
215-
- [Placeholders and universes](./borrow_check/region_inference/placeholders_and_universes.md)
216-
- [Closure constraints](./borrow_check/region_inference/closure_constraints.md)
217-
- [Error reporting](./borrow_check/region_inference/error_reporting.md)
218-
- [Two-phase-borrows](./borrow_check/two_phase_borrows.md)
206+
- [The borrow checker](./borrow-check.md)
207+
- [Tracking moves and initialization](./borrow-check/moves-and-initialization.md)
208+
- [Move paths](./borrow-check/moves-and-initialization/move-paths.md)
209+
- [MIR type checker](./borrow-check/type-check.md)
210+
- [Drop check](./borrow-check/drop-check.md)
211+
- [Region inference](./borrow-check/region-inference.md)
212+
- [Constraint propagation](./borrow-check/region-inference/constraint-propagation.md)
213+
- [Lifetime parameters](./borrow-check/region-inference/lifetime-parameters.md)
214+
- [Member constraints](./borrow-check/region-inference/member-constraints.md)
215+
- [Placeholders and universes](./borrow-check/region-inference/placeholders-and-universes.md)
216+
- [Closure constraints](./borrow-check/region-inference/closure-constraints.md)
217+
- [Error reporting](./borrow-check/region-inference/error-reporting.md)
218+
- [Two-phase-borrows](./borrow-check/two-phase-borrows.md)
219219
- [Closure capture inference](./closure.md)
220220
- [Async closures/"coroutine-closures"](coroutine-closures.md)
221221

src/appendix/background.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,7 @@ use in lambda calculus evaluation (see [this Wikipedia article][wikideb] for
243243
more). In `rustc`, we use de Bruijn indices to [represent generic types][sub].
244244

245245
[wikideb]: https://en.wikipedia.org/wiki/De_Bruijn_index
246-
[sub]: ../ty_module/generic_arguments.md
247-
246+
[sub]: ../ty-module/generic-arguments.md
248247

249248
Here is a basic example of how de Bruijn indices might be used for closures (we
250249
don't actually do this in `rustc` though!):

src/appendix/glossary.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ Term | Meaning
5353
<span id="normalize">normalize</span> | A general term for converting to a more canonical form, but in the case of rustc typically refers to [associated type normalization](../traits/goals-and-clauses.md#normalizeprojection---type).
5454
<span id="newtype">newtype</span> | A wrapper around some other type (e.g., `struct Foo(T)` is a "newtype" for `T`). This is commonly used in Rust to give a stronger type for indices.
5555
<span id="niche">niche</span> | Invalid bit patterns for a type _that can be used_ for layout optimizations. Some types cannot have certain bit patterns. For example, the `NonZero*` integers or the reference `&T` cannot be represented by a 0 bitstring. This means the compiler can perform layout optimizations by taking advantage of the invalid "niche value". An example application for this is the [*Discriminant elision on `Option`-like enums*](https://rust-lang.github.io/unsafe-code-guidelines/layout/enums.html#discriminant-elision-on-option-like-enums), which allows using a type's niche as the ["tag"](#tag) for an `enum` without requiring a separate field.
56-
<span id="nll">NLL</span> | Short for [non-lexical lifetimes](../borrow_check/region_inference.md), this is an extension to Rust's borrowing system to make it be based on the control-flow graph.
56+
<span id="nll">NLL</span> | Short for [non-lexical lifetimes](../borrow-check/region-inference.md), this is an extension to Rust's borrowing system to make it be based on the control-flow graph.
5757
<span id="node-id">node-id or `NodeId`</span> | An index identifying a particular node in the AST or HIR; gradually being phased out and replaced with `HirId`. See [the HIR chapter for more](../hir.md#identifiers-in-the-hir).
5858
<span id="obligation">obligation</span> | Something that must be proven by the trait system. ([see more](../traits/resolution.md))
59-
<span id="placeholder">placeholder</span> | **NOTE: skolemization is deprecated by placeholder** a way of handling subtyping around "for-all" types (e.g., `for<'a> fn(&'a u32)`) as well as solving higher-ranked trait bounds (e.g., `for<'a> T: Trait<'a>`). See [the chapter on placeholder and universes](../borrow_check/region_inference/placeholders_and_universes.md) for more details.
59+
<span id="placeholder">placeholder</span> | **NOTE: skolemization is deprecated by placeholder** a way of handling subtyping around "for-all" types (e.g., `for<'a> fn(&'a u32)`) as well as solving higher-ranked trait bounds (e.g., `for<'a> T: Trait<'a>`). See [the chapter on placeholder and universes](../borrow-check/region-inference/placeholders-and-universes.md) for more details.
6060
<span id="point">point</span> | Used in the NLL analysis to refer to some particular location in the MIR; typically used to refer to a node in the control-flow graph.
6161
<span id="projection">projection</span> | A general term for a "relative path", e.g. `x.f` is a "field projection", and `T::Item` is an ["associated type projection"](../traits/goals-and-clauses.md#trait-ref).
6262
<span id="pc">promoted constants</span> | Constants extracted from a function and lifted to static scope; see [this section](../mir/index.md#promoted) for more details.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ the [`mir_borrowck`] query.
4242
- Next, we perform a number of
4343
[dataflow analyses](./appendix/background.md#dataflow) that
4444
compute what data is moved and when.
45-
- We then do a [second type check](borrow_check/type_check.md) across the MIR:
45+
- We then do a [second type check](borrow-check/type_check.md) across the MIR:
4646
the purpose of this type check is to determine all of the constraints between
4747
different regions.
48-
- Next, we do [region inference](borrow_check/region_inference.md), which computes
48+
- Next, we do [region inference](borrow-check/region_inference.md), which computes
4949
the values of each region — basically, the points in the control-flow graph where
5050
each lifetime must be valid according to the constraints we collected.
5151
- At this point, we can compute the "borrows in scope" at each point.
File renamed without changes.

src/borrow_check/moves_and_initialization.md renamed to src/borrow-check/moves-and-initialization.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ Consider this example:
2020
```rust,ignore
2121
fn foo() {
2222
let a: Vec<u32>;
23-
23+
2424
// a is not initialized yet
25-
25+
2626
a = vec![22];
27-
27+
2828
// a is initialized here
29-
29+
3030
std::mem::drop(a); // a is moved here
31-
31+
3232
// a is no longer initialized here
3333
3434
let l = a.len(); //~ ERROR
@@ -44,7 +44,7 @@ moves `a` into the call, and hence it becomes uninitialized again.
4444
To make it easier to peruse, this section is broken into a number of
4545
subsections:
4646

47-
- [Move paths](./moves_and_initialization/move_paths.html) the
47+
- [Move paths](./moves-and-initialization/move_paths.html) the
4848
*move path* concept that we use to track which local variables (or parts of
4949
local variables, in some cases) are initialized.
5050
- TODO *Rest not yet written* =)

src/borrow_check/moves_and_initialization/move_paths.md renamed to src/borrow-check/moves-and-initialization/move-paths.md

File renamed without changes.

src/borrow_check/opaque-types-region-inference-restrictions.md renamed to src/borrow-check/opaque-types-region-inference-restrictions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ See [#113971] for how we used to conflate the difference.
158158

159159
[#113971]: https://github.com/rust-lang/rust/issues/113971
160160
[SCC]: https://en.wikipedia.org/wiki/Strongly_connected_component
161-
[member constraints]: ./region_inference/member_constraints.md
161+
[member constraints]: region-inference/member_constraints.md
162162

163163
**interaction with "once modulo regions" restriction**
164164
In the example above, note the opaque type in the signature is `Opaque<'a>` and the one in the
@@ -195,7 +195,7 @@ fn test<'a>() -> Opaque<'a> {
195195
}
196196
```
197197

198-
**Motivation:**
198+
**Motivation:**
199199
In closure bodies, external lifetimes, although being categorized as "universal" lifetimes,
200200
behave more like existential lifetimes in that the relations between them are not known ahead of
201201
time, instead their values are inferred just like existential lifetimes and the requirements are
@@ -208,7 +208,7 @@ Here is an example that details how :
208208
```rust
209209
type Opaque<'x, 'y> = impl Sized;
210210

211-
//
211+
//
212212
fn test<'a, 'b>(s: &'a str) -> impl FnOnce() -> Opaque<'a, 'b> {
213213
move || { s }
214214
//~^ ERROR hidden type for `Opaque<'_, '_>` captures lifetime that does not appear in bounds
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The MIR-based region analysis consists of two major functions:
3434
- The [NLL RFC] also includes fairly thorough (and hopefully readable)
3535
coverage.
3636

37-
[cp]: ./region_inference/constraint_propagation.md
37+
[cp]: ./region-inference/constraint_propagation.md
3838
[fvb]: ../appendix/background.md#free-vs-bound
3939
[`replace_regions_in_mir`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/nll/fn.replace_regions_in_mir.html
4040
[`compute_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/nll/fn.compute_regions.html
@@ -97,7 +97,7 @@ The kinds of region elements are as follows:
9797
- There is an element `!1` for each placeholder region `!1`. This
9898
corresponds (intuitively) to some unknown set of other elements –
9999
for details on placeholders, see the section
100-
[placeholders and universes](region_inference/placeholders_and_universes.md).
100+
[placeholders and universes](region-inference/placeholders_and_universes.md).
101101

102102
## Constraints
103103

0 commit comments

Comments
 (0)