File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,9 +32,10 @@ strings.
3232### Parameter packs
3333
3434A 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" : {
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments