[minor] documentation improvement (#20825)

[minor] documentation improvament
This commit is contained in:
ringabout 2022-11-13 04:05:57 +08:00 • committed by GitHub
commit 73680cef95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,10 +7,10 @@ macro byaddr*(sect) =
## Allows a syntax for l-value references, being an exact analog to ## Allows a syntax for l-value references, being an exact analog to
## `auto& a = ex;` in C++. ## `auto& a = ex;` in C++.
## ##
## Warning: This makes use of 2 experimental features, namely nullary ## .. warning:: This makes use of 2 experimental features, namely nullary
## templates instantiated as symbols and variable macro pragmas. ## templates instantiated as symbols and variable macro pragmas.
## For this reason, its behavior is not stable. The current implementation ## For this reason, its behavior is not stable. The current implementation
## allows redefinition, but this is not an intended consequence. ## allows redefinition, but this is not an intended consequence.
runnableExamples: runnableExamples:
var s = @[10, 11, 12] var s = @[10, 11, 12]
var a {.byaddr.} = s[0] var a {.byaddr.} = s[0]