Skip to content

Commit 5833d1f

Browse files
committed
Update docs
1 parent b1ac983 commit 5833d1f

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

‎docs/src/rules/ir.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ strings.
3232
### Parameter packs
3333

3434
A function parameter pack prints as `&&...`, so the key of a rule for
35-
`emplace_back(Args &&...args)` matches calls with any number of arguments. A rule
36-
that takes an [`init`](./writing-rules.md#constructing-from-forwarded-arguments)
37-
value also records which template argument of the callee `init` builds:
35+
`emplace_back(Args &&...args)` matches calls with any number of arguments. A
36+
rule that takes an
37+
[`init`](./writing-rules.md#constructing-from-forwarded-arguments) value also
38+
records which template argument of the callee `init` builds:
3839

3940
```json
4041
"f112": {

‎docs/src/rules/writing-rules.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,13 @@ unsafe fn f112<T1>(a0: &mut Vec<T1>, init: T1) {
311311
}
312312
```
313313

314-
`T` must be one of the callee's template arguments. The preprocessor records
315-
its position as a (depth, index) pair, and at a call like `v.emplace_back(4, 5)`
316-
on a `std::vector<Point>` the converter reads the template argument at that
317-
position from the resolved callee (`Point`). It then asks Sema which
318-
constructor builds a `Point` from `(4, 5)` and substitutes the converted
319-
construction for `init`. Binding `init` to a local before touching `a0` keeps
320-
the construction from overlapping a borrow of the container.
314+
`T` must be one of the callee's template arguments. The preprocessor records its
315+
position as a (depth, index) pair, and at a call like `v.emplace_back(4, 5)` on
316+
a `std::vector<Point>` the converter reads the template argument at that
317+
position from the resolved callee (`Point`). It then asks Sema which constructor
318+
builds a `Point` from `(4, 5)` and substitutes the converted construction for
319+
`init`. Binding `init` to a local before touching `a0` keeps the construction
320+
from overlapping a borrow of the container.
321321

322322
## Passthrough rules
323323

0 commit comments

Comments
 (0)