Skip to content

Commit dc623d1

Browse files
WalterBrightdlang-bot
authored andcommitted
Minor adjustment to Scope Parameters section
1 parent 89c57ea commit dc623d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/function.dd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,7 @@ $(H3 $(LNAME2 scope-parameters, Scope Parameters))
16021602
(e.g. by being assigned to a global variable). It has no effect for non-reference types.
16031603
`scope` escape analysis is only done for `@safe` functions. For other functions `scope`
16041604
semantics must be manually enforced.)
1605-
$(P $(B Note): `scope` escape analysis is currently only done by `dmd`
1605+
$(NOTE `scope` escape analysis is currently only done by the `dmd` compiler
16061606
when the `-dip1000` switch is passed.)
16071607

16081608
---
@@ -1632,7 +1632,7 @@ int* balin(scope int* q, int* r)
16321632
literal or a $(GLINK2 expression, NewExpression) to a scope parameter may be allowed in a
16331633
`@nogc` context, depending on the compiler implementation.)
16341634

1635-
$(H4 $(LNAME2 return-scope-parameters, Return Scope Parameters))
1635+
$(H3 $(LNAME2 return-scope-parameters, Return Scope Parameters))
16361636

16371637
$(P Parameters marked as `return scope` that contain indirections
16381638
can only escape those indirections via the function's return value.)
@@ -1693,13 +1693,13 @@ class C
16931693
$(P Template functions, auto functions, nested functions and lambdas can deduce
16941694
the `return scope` attribute.)
16951695

1696-
$(H4 $(LNAME2 ref-return-scope-parameters, Ref Return Scope Parameters))
1696+
$(H3 $(LNAME2 ref-return-scope-parameters, Ref Return Scope Parameters))
16971697

16981698
$(P Parameters marked as `ref return scope` come in two forms:)
16991699

17001700
---
17011701
U xerxes(ref return scope V v); // (1) ref and return scope
1702-
ref U xerxes(ref return scope V v); // (2) return ref and scope
1702+
ref U sargon(ref return scope V v); // (2) return ref and scope
17031703
---
17041704

17051705
$(P The first form attaches the `return` to the `scope`, and has

0 commit comments

Comments
 (0)