diff --git a/dlang.org.ddoc b/dlang.org.ddoc index 2c49a2b73f..d5b0975cf0 100644 --- a/dlang.org.ddoc +++ b/dlang.org.ddoc @@ -175,6 +175,7 @@ _= GEN_DATETIME=$(DATETIME) GLINK=$(RELATIVE_LINK2 $0, $(I $0)) GLINK2=$(DDSUBLINK spec/$1,$2,$(I $2)) +GLINK2_ALTTEXT=$(DDSUBLINK spec/$1,$2,$(I $3)) GLOSSARY = $(HTTP dlang.org/glossary.html#$0, $0) GLOSSARY2 = $(HTTP dlang.org/glossary.html#$1, $2) GNAME=$(SPANC gname, $0) diff --git a/ebook.ddoc b/ebook.ddoc index 517f9dafc6..ac8beebbeb 100644 --- a/ebook.ddoc +++ b/ebook.ddoc @@ -49,6 +49,7 @@ MODDEFFILE=
$0

_= GLINK2=$(GLINK $2) +GLINK2_ALTTEXT=$(RELATIVE_LINK2 $2, $3) DDLINK=$(RELATIVE_LINK2 $2, $3) DDSUBLINK=$(RELATIVE_LINK2 $2, $3) DPLLINK=$(LINK2 https://dlang.org/$1, $2) diff --git a/spec/attribute.dd b/spec/attribute.dd index d663a76daa..38ccad149d 100644 --- a/spec/attribute.dd +++ b/spec/attribute.dd @@ -783,6 +783,9 @@ pragma(msg, __traits(getAttributes, typeof(a))); // prints tuple("hello") attributes accumulate or override earlier ones is also up to how the user interprets them. ) + $(P + UDAs cannot be attached to template parameters. + ) $(SPEC_SUBNAV_PREV_NEXT property, Properties, pragma, Pragmas) ) diff --git a/spec/expression.dd b/spec/expression.dd index 294ac45224..4d4ffc1a12 100644 --- a/spec/expression.dd +++ b/spec/expression.dd @@ -1401,16 +1401,16 @@ $(H3 $(LNAME2 function_literals, Function Literals)) $(GRAMMAR $(GNAME FunctionLiteral): - $(D function) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterAttributes) $(OPT) $(GLINK FunctionLiteralBody) - $(D delegate) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterMemberAttributes) $(OPT) $(GLINK FunctionLiteralBody) + $(D function) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterWithAttributes) $(OPT) $(GLINK FunctionLiteralBody) + $(D delegate) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterWithMemberAttributes) $(OPT) $(GLINK FunctionLiteralBody) $(GLINK ParameterMemberAttributes) $(GLINK FunctionLiteralBody) $(GLINK FunctionLiteralBody) $(GLINK Lambda) -$(GNAME ParameterAttributes): +$(GNAME ParameterWithAttributes): $(GLINK2 function, Parameters) $(GLINK2 function, FunctionAttributes)$(OPT) -$(GNAME ParameterMemberAttributes): +$(GNAME ParameterWithMemberAttributes): $(GLINK2 function, Parameters) $(GLINK2 function, MemberFunctionAttributes)$(OPT) $(GNAME FunctionLiteralBody): diff --git a/spec/function.dd b/spec/function.dd index b5d95f5358..7ac6fce02b 100644 --- a/spec/function.dd +++ b/spec/function.dd @@ -36,17 +36,20 @@ $(GNAME ParameterList): $(D ...) $(GNAME Parameter): - $(I InOut)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator) - $(I InOut)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator) $(D ...) - $(I InOut)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator) = $(ASSIGNEXPRESSION) - $(I InOut)$(OPT) $(GLINK2 declaration, Type) - $(I InOut)$(OPT) $(GLINK2 declaration, Type) $(D ...) + $(I ParameterAttributes)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator) + $(I ParameterAttributes)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator) $(D ...) + $(I ParameterAttributes)$(OPT) $(GLINK2 declaration, BasicType) $(GLINK2 declaration, Declarator) = $(ASSIGNEXPRESSION) + $(I ParameterAttributes)$(OPT) $(GLINK2 declaration, Type) + $(I ParameterAttributes)$(OPT) $(GLINK2 declaration, Type) $(D ...) + +$(GNAME ParameterAttributes): + $(I InOut) + $(GLINK2 attribute, UserDefinedAttribute) + $(I ParameterAttributes InOut) + $(I ParameterAttributes) $(GLINK2 attribute, UserDefinedAttribute) + $(I ParameterAttributes) $(GNAME InOut): - $(I InOutX) - $(I InOut InOutX) - -$(GNAME InOutX): $(D auto) $(GLINK2 declaration, TypeCtor) $(D final) @@ -1413,6 +1416,11 @@ $(P Template functions and lambdas can deduce the `return` attribute.) $(P `inout ref` parameters imply the `return` attribute.) + +$(H3 $(LNAME2 udas-parameters, User-Defined Attributes for Parameters)) + +See also: $(GLINK2_ALTTEXT attribute, UserDefinedAttribute, User-Defined Attributes) + $(H3 $(LNAME2 variadic, Variadic Functions)) $(P Functions taking a variable number of arguments are called diff --git a/spec/latex.ddoc b/spec/latex.ddoc index 82f42cf261..360ba72183 100644 --- a/spec/latex.ddoc +++ b/spec/latex.ddoc @@ -93,6 +93,7 @@ _= GLINK=$(LINK2 $0, $(I $0)) GLINK2=$(GLINK $2) +GLINK2_ALTTEXT=$(LINK2 $2, $(I $3)) GNAME={\fontshape{sl}\selectfont $0} _=