Skip to content

Commit 179b285

Browse files
authored
[spec/attribute] Tweaks (#3562)
Add link for @LiVe. Improve formatting. Tweak wording. Fix missing `shared` link. Fix wrong simple assignment link (anchor name must not have leading indentation). Fix assignment operator link typo.
1 parent 3927be8 commit 179b285

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

spec/attribute.dd

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $(GNAME FunctionAttributeKwd):
4040
$(GNAME AtAttribute):
4141
$(D @) $(RELATIVE_LINK2 disable, $(D disable))
4242
$(D @) $(RELATIVE_LINK2 nogc, $(D nogc))
43-
$(D @) $(D live)
43+
$(D @) $(DDLINK spec/ob, Live Functions, `live`)
4444
$(GLINK Property)
4545
$(D @) $(RELATIVE_LINK2 safe, $(D safe))
4646
$(D @) $(RELATIVE_LINK2 safe, $(D system))
@@ -103,7 +103,7 @@ $(GNAME NamespaceList):
103103
$(P D provides an easy way to call C functions and operating
104104
system API functions, as compatibility with both is essential.
105105
The $(I LinkageType) is case sensitive, and is meant to be
106-
extensible by the implementation ($(D they are not keywords)).
106+
extensible by the implementation ($(I they are not keywords)).
107107
$(D C) and $(D D) must be supplied, the others are what
108108
makes sense for the implementation.
109109
$(D C++) offers limited compatibility with C++, see the
@@ -114,7 +114,8 @@ $(GNAME NamespaceList):
114114
documentation for more information.
115115
$(D System) is the same as $(D Windows) on Windows platforms,
116116
and $(D C) on other platforms.
117-
$(D Implementation Note:)
117+
)
118+
$(P $(B Implementation Note:)
118119
for Win32 platforms, $(D Windows) should exist.
119120
)
120121

@@ -156,8 +157,8 @@ extern (Windows):
156157
where it is equivalent to the
157158
$(LINK2 https://en.wikipedia.org/wiki/X86_calling_conventions, stdcall) convention.)
158159

159-
$(P Note that a lone $(D extern) declaration is used as a
160-
$(DDSUBLINK spec/declaration, extern, storage class).)
160+
$(P Note that a $(DDSUBLINK spec/declaration, extern, lone $(D extern) keyword)
161+
is used as a storage class.)
161162

162163
$(H3 C++ $(LNAME2 namespace, Namespaces))
163164

@@ -197,7 +198,7 @@ $(H3 C++ $(LNAME2 namespace, Namespaces))
197198
---
198199
)
199200

200-
$(P Multiple identifiers in the $(I QualifiedIdentifier) create nested namespaces:)
201+
$(P Multiple dotted identifiers in the $(I QualifiedIdentifier) create nested namespaces:)
201202

202203
---
203204
extern (C++, N.M) { extern (C++) { extern (C++, R) { void foo(); } } }
@@ -563,7 +564,8 @@ $(H3 $(LNAME2 gshared, $(D __gshared) Attribute))
563564
}
564565
---
565566

566-
$(P Unlike the $(RELATIVE_LINK2 shared) attribute, $(D __gshared) provides no
567+
$(P $(RED Warning:)
568+
Unlike the $(RELATIVE_LINK2 shared, `shared`) attribute, $(D __gshared) provides no
567569
safeguards against data races or other multi-threaded synchronization
568570
issues. It is the responsibility of the programmer to ensure that
569571
access to variables marked $(D __gshared) is synchronized correctly.)
@@ -971,9 +973,9 @@ $(H2 $(LNAME2 mustuse-attribute, `@mustuse` Attribute))
971973
)
972974

973975
$(P
974-
"Assignment expression" means either a $(DDSUBLINK spec/expression,
975-
simple_assignment_expressions, simple assignment expression) or an
976-
$(DDSUBLINK spec/expression, assignment_operator_expression, assignment
976+
"Assignment expression" means either a $(DDSUBLINK spec/expression, simple_assignment_expressions,
977+
simple assignment expression) or an
978+
$(DDSUBLINK spec/expression, assignment_operator_expressions, assignment
977979
operator expression).
978980
)
979981

0 commit comments

Comments
 (0)