Skip to content

Commit 8889dcd

Browse files
varkormark-i-m
authored andcommitted
Replace txt with text
1 parent 43341c8 commit 8889dcd

17 files changed

+101
-101
lines changed

src/appendix-stupid-stats.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ foo.rs` (assuming you have a Rust program called `foo.rs`. You can also pass any
177177
command line arguments that you would normally pass to rustc). When you run it
178178
you'll see output similar to
179179

180-
```txt
180+
```text
181181
In crate: foo,
182182
183183
Found 12 uses of `println!`;

src/high-level-overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ compilation improves, that may change.)
1919

2020
The dependency structure of these crates is roughly a diamond:
2121

22-
```txt
22+
```text
2323
rustc_driver
2424
/ | \
2525
/ | \

src/incrcomp-debugging.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ the graph. You can filter in three ways:
4848
To filter, use the `RUST_DEP_GRAPH_FILTER` environment variable, which should
4949
look like one of the following:
5050

51-
```txt
51+
```text
5252
source_filter // nodes originating from source_filter
5353
-> target_filter // nodes that can reach target_filter
5454
source_filter -> target_filter // nodes in between source_filter and target_filter
@@ -58,14 +58,14 @@ source_filter -> target_filter // nodes in between source_filter and target_filt
5858
A node is considered to match a filter if all of those strings appear in its
5959
label. So, for example:
6060

61-
```txt
61+
```text
6262
RUST_DEP_GRAPH_FILTER='-> TypeckTables'
6363
```
6464

6565
would select the predecessors of all `TypeckTables` nodes. Usually though you
6666
want the `TypeckTables` node for some particular fn, so you might write:
6767

68-
```txt
68+
```text
6969
RUST_DEP_GRAPH_FILTER='-> TypeckTables & bar'
7070
```
7171

@@ -75,7 +75,7 @@ with `bar` in their name.
7575
Perhaps you are finding that when you change `foo` you need to re-type-check
7676
`bar`, but you don't think you should have to. In that case, you might do:
7777

78-
```txt
78+
```text
7979
RUST_DEP_GRAPH_FILTER='Hir & foo -> TypeckTables & bar'
8080
```
8181

@@ -105,7 +105,7 @@ check of `bar` and you don't think there should be. You dump the
105105
dep-graph as described in the previous section and open `dep-graph.txt`
106106
to see something like:
107107

108-
```txt
108+
```text
109109
Hir(foo) -> Collect(bar)
110110
Collect(bar) -> TypeckTables(bar)
111111
```

src/method-lookup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ So, let's continue our example. Imagine that we were calling a method
9999
that defines it with `&self` for the type `Rc<U>` as well as a method
100100
on the type `Box` that defines `Foo` but with `&mut self`. Then we
101101
might have two candidates:
102-
```txt
102+
```text
103103
&Rc<Box<[T; 3]>> from the impl of `Foo` for `Rc<U>` where `U=Box<T; 3]>
104104
&mut Box<[T; 3]>> from the inherent impl on `Box<U>` where `U=[T; 3]`
105105
```

src/mir-passes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn main() {
5252
The files have names like `rustc.main.000-000.CleanEndRegions.after.mir`. These
5353
names have a number of parts:
5454

55-
```txt
55+
```text
5656
rustc.main.000-000.CleanEndRegions.after.mir
5757
---- --- --- --------------- ----- either before or after
5858
| | | name of the pass
@@ -159,7 +159,7 @@ ensuring that the reads have already happened (remember that
159159
[queries are memoized](./query.html), so executing a query twice
160160
simply loads from a cache the second time):
161161

162-
```txt
162+
```text
163163
mir_const(D) --read-by--> mir_const_qualif(D)
164164
| ^
165165
stolen-by |

src/mir-regionck.md

+26-26
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ stack, for example). But *how* do we reject it and *why*?
122122
When we type-check `main`, and in particular the call `bar(foo)`, we
123123
are going to wind up with a subtyping relationship like this one:
124124

125-
```txt
125+
```text
126126
fn(&'static u32) <: for<'a> fn(&'a u32)
127127
---------------- -------------------
128128
the type of `foo` the type `bar` expects
@@ -137,7 +137,7 @@ regions" -- they represent, basically, "some unknown region".
137137

138138
Once we've done that replacement, we have the following relation:
139139

140-
```txt
140+
```text
141141
fn(&'static u32) <: fn(&'!1 u32)
142142
```
143143

@@ -151,7 +151,7 @@ subtypes, we check if their arguments have the desired relationship
151151
(fn arguments are [contravariant](./appendix-background.html#variance), so
152152
we swap the left and right here):
153153

154-
```txt
154+
```text
155155
&'!1 u32 <: &'static u32
156156
```
157157

@@ -201,7 +201,7 @@ Here, the name `'b` is not part of the root universe. Instead, when we
201201
"enter" into this `for<'b>` (e.g., by skolemizing it), we will create
202202
a child universe of the root, let's call it U1:
203203

204-
```txt
204+
```text
205205
U0 (root universe)
206206
207207
└─ U1 (child universe)
@@ -224,7 +224,7 @@ When we enter *this* type, we will again create a new universe, which
224224
we'll call `U2`. Its parent will be the root universe, and U1 will be
225225
its sibling:
226226

227-
```txt
227+
```text
228228
U0 (root universe)
229229
230230
├─ U1 (child universe)
@@ -263,7 +263,7 @@ children, that inference variable X would have to be in U0. And since
263263
X is in U0, it cannot name anything from U1 (or U2). This is perhaps easiest
264264
to see by using a kind of generic "logic" example:
265265

266-
```txt
266+
```text
267267
exists<X> {
268268
forall<Y> { ... /* Y is in U1 ... */ }
269269
forall<Z> { ... /* Z is in U2 ... */ }
@@ -296,7 +296,7 @@ does not say region elements **will** appear.
296296

297297
In the region inference engine, outlives constraints have the form:
298298

299-
```txt
299+
```text
300300
V1: V2 @ P
301301
```
302302

@@ -346,7 +346,7 @@ for universal regions from the fn signature.)
346346
Put another way, the "universal regions" check can be considered to be
347347
checking constraints like:
348348

349-
```txt
349+
```text
350350
{skol(1)}: V1
351351
```
352352

@@ -358,13 +358,13 @@ made to represent the `!1` region.
358358
OK, so far so good. Now let's walk through what would happen with our
359359
first example:
360360

361-
```txt
361+
```text
362362
fn(&'static u32) <: fn(&'!1 u32) @ P // this point P is not imp't here
363363
```
364364

365365
The region inference engine will create a region element domain like this:
366366

367-
```txt
367+
```text
368368
{ CFG; end('static); skol(1) }
369369
--- ------------ ------- from the universe `!1`
370370
| 'static is always in scope
@@ -375,20 +375,20 @@ It will always create two universal variables, one representing
375375
`'static` and one representing `'!1`. Let's call them Vs and V1. They
376376
will have initial values like so:
377377

378-
```txt
378+
```text
379379
Vs = { CFG; end('static) } // it is in U0, so can't name anything else
380380
V1 = { skol(1) }
381381
```
382382

383383
From the subtyping constraint above, we would have an outlives constraint like
384384

385-
```txt
385+
```text
386386
'!1: 'static @ P
387387
```
388388

389389
To process this, we would grow the value of V1 to include all of Vs:
390390

391-
```txt
391+
```text
392392
Vs = { CFG; end('static) }
393393
V1 = { CFG; end('static), skol(1) }
394394
```
@@ -405,15 +405,15 @@ In this case, `V1` *did* grow too large -- it is not known to outlive
405405

406406
What about this subtyping relationship?
407407

408-
```txt
408+
```text
409409
for<'a> fn(&'a u32, &'a u32)
410410
<:
411411
for<'b, 'c> fn(&'b u32, &'c u32)
412412
```
413413

414414
Here we would skolemize the supertype, as before, yielding:
415415

416-
```txt
416+
```text
417417
for<'a> fn(&'a u32, &'a u32)
418418
<:
419419
fn(&'!1 u32, &'!2 u32)
@@ -423,22 +423,22 @@ then we instantiate the variable on the left-hand side with an
423423
existential in universe U2, yielding the following (`?n` is a notation
424424
for an existential variable):
425425

426-
```txt
426+
```text
427427
fn(&'?3 u32, &'?3 u32)
428428
<:
429429
fn(&'!1 u32, &'!2 u32)
430430
```
431431

432432
Then we break this down further:
433433

434-
```txt
434+
```text
435435
&'!1 u32 <: &'?3 u32
436436
&'!2 u32 <: &'?3 u32
437437
```
438438

439439
and even further, yield up our region constraints:
440440

441-
```txt
441+
```text
442442
'!1: '?3
443443
'!2: '?3
444444
```
@@ -465,7 +465,7 @@ common lifetime of our arguments. -nmatsakis)
465465
Let's look at one last example. We'll extend the previous one to have
466466
a return type:
467467

468-
```txt
468+
```text
469469
for<'a> fn(&'a u32, &'a u32) -> &'a u32
470470
<:
471471
for<'b, 'c> fn(&'b u32, &'c u32) -> &'b u32
@@ -478,23 +478,23 @@ first one. That is unsound. Let's see how it plays out.
478478

479479
First, we skolemize the supertype:
480480

481-
```txt
481+
```text
482482
for<'a> fn(&'a u32, &'a u32) -> &'a u32
483483
<:
484484
fn(&'!1 u32, &'!2 u32) -> &'!1 u32
485485
```
486486

487487
Then we instantiate the subtype with existentials (in U2):
488488

489-
```txt
489+
```text
490490
fn(&'?3 u32, &'?3 u32) -> &'?3 u32
491491
<:
492492
fn(&'!1 u32, &'!2 u32) -> &'!1 u32
493493
```
494494

495495
And now we create the subtyping relationships:
496496

497-
```txt
497+
```text
498498
&'!1 u32 <: &'?3 u32 // arg 1
499499
&'!2 u32 <: &'?3 u32 // arg 2
500500
&'?3 u32 <: &'!1 u32 // return type
@@ -503,15 +503,15 @@ And now we create the subtyping relationships:
503503
And finally the outlives relationships. Here, let V1, V2, and V3 be the
504504
variables we assign to `!1`, `!2`, and `?3` respectively:
505505

506-
```txt
506+
```text
507507
V1: V3
508508
V2: V3
509509
V3: V1
510510
```
511511

512512
Those variables will have these initial values:
513513

514-
```txt
514+
```text
515515
V1 in U1 = {skol(1)}
516516
V2 in U2 = {skol(2)}
517517
V3 in U2 = {}
@@ -520,14 +520,14 @@ V3 in U2 = {}
520520
Now because of the `V3: V1` constraint, we have to add `skol(1)` into `V3` (and
521521
indeed it is visible from `V3`), so we get:
522522

523-
```txt
523+
```text
524524
V3 in U2 = {skol(1)}
525525
```
526526

527527
then we have this constraint `V2: V3`, so we wind up having to enlarge
528528
`V2` to include `skol(1)` (which it can also see):
529529

530-
```txt
530+
```text
531531
V2 in U2 = {skol(1), skol(2)}
532532
```
533533

src/mir.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ _3 = &mut _1;
159159

160160
Assignments in general have the form:
161161

162-
```txt
162+
```text
163163
<Place> = <Rvalue>
164164
```
165165

@@ -169,7 +169,7 @@ value: in this case, the rvalue is a mutable borrow expression, which
169169
looks like `&mut <Place>`. So we can kind of define a grammar for
170170
rvalues like so:
171171

172-
```txt
172+
```text
173173
<Rvalue> = & (mut)? <Place>
174174
| <Operand> + <Operand>
175175
| <Operand> - <Operand>

src/tests/adding.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ default regex flavor provided by `regex` crate.
298298
The corresponding reference file will use the normalized output to test both
299299
32-bit and 64-bit platforms:
300300

301-
```txt
301+
```text
302302
...
303303
|
304304
= note: source type: fn() ($PTR bits)

src/traits-associated-types.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ In our logic, normalization is defined by a predicate
5151
impls. For example, the `impl` of `IntoIterator` for `Option<T>` that
5252
we saw above would be lowered to a program clause like so:
5353

54-
```txt
54+
```text
5555
forall<T> {
5656
Normalize(<Option<T> as IntoIterator>::Item -> T)
5757
}
@@ -101,15 +101,15 @@ consider an associated type projection equal to another type?":
101101
We now introduce the `ProjectionEq` predicate to bring those two cases
102102
together. The `ProjectionEq` predicate looks like so:
103103

104-
```txt
104+
```text
105105
ProjectionEq(<T as IntoIterator>::Item = U)
106106
```
107107

108108
and we will see that it can be proven *either* via normalization or
109109
skolemization. As part of lowering an associated type declaration from
110110
some trait, we create two program clauses for `ProjectionEq`:
111111

112-
```txt
112+
```text
113113
forall<T, U> {
114114
ProjectionEq(<T as IntoIterator>::Item = U) :-
115115
Normalize(<T as IntoIterator>::Item -> U)
@@ -130,7 +130,7 @@ with unification. As described in the
130130
[type inference](./type-inference.html) section, unification is
131131
basically a procedure with a signature like this:
132132

133-
```txt
133+
```text
134134
Unify(A, B) = Result<(Subgoals, RegionConstraints), NoSolution>
135135
```
136136

0 commit comments

Comments
 (0)