Skip to content

Commit 49bb360

Browse files
ntreldlang-bot
authored andcommitted
[spec/function] Tweak attribute inference docs
Use list for inferred attributes.
1 parent f17da6c commit 49bb360

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

spec/function.dd

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3976,16 +3976,16 @@ $(H2 $(LNAME2 function-attribute-inference, Function Attribute Inference))
39763976
$(RELATIVE_LINK2 nested, nested functions) and
39773977
$(DDSUBLINK spec/template, function-templates, function templates),
39783978
since their function bodies are always present, infer the
3979-
$(RELATIVE_LINK2 pure-functions, $(D pure)),
3980-
$(RELATIVE_LINK2 nothrow-functions, $(D nothrow)),
3981-
$(RELATIVE_LINK2 safe-functions, $(D @safe)),
3982-
$(RELATIVE_LINK2 nogc-functions, $(D @nogc)),
3983-
$(RELATIVE_LINK2 return-ref-parameters, return ref parameters),
3984-
$(RELATIVE_LINK2 scope-parameters, scope parameters),
3985-
$(RELATIVE_LINK2 return-scope-parameters, return scope parameters) and
3986-
$(RELATIVE_LINK2 ref-return-scope-parameters, ref return scope parameters)
3987-
attributes unless specifically overridden.
3979+
following attributes unless specifically overridden:
39883980
)
3981+
* $(RELATIVE_LINK2 pure-functions, $(D pure))
3982+
* $(RELATIVE_LINK2 nothrow-functions, $(D nothrow))
3983+
* $(RELATIVE_LINK2 safe-functions, $(D @safe))
3984+
* $(RELATIVE_LINK2 nogc-functions, $(D @nogc))
3985+
* $(RELATIVE_LINK2 return-ref-parameters, return ref parameters)
3986+
* $(RELATIVE_LINK2 scope-parameters, scope parameters)
3987+
* $(RELATIVE_LINK2 return-scope-parameters, return scope parameters)
3988+
* $(RELATIVE_LINK2 ref-return-scope-parameters, ref return scope parameters)
39893989

39903990
$(P Attribute inference is not done for other functions, even if the function
39913991
body is present.
@@ -3996,7 +3996,7 @@ $(H2 $(LNAME2 function-attribute-inference, Function Attribute Inference))
39963996
)
39973997

39983998
$(P Cyclic functions (i.e. functions that wind up directly or indirectly
3999-
calling themselves) are inferred as being impure, throwing, and @system.
3999+
calling themselves) are inferred as being impure, throwing, and `@system`.
40004000
)
40014001

40024002
$(P If a function attempts to test itself for those attributes, then

0 commit comments

Comments
 (0)