minor doc improvements
This commit is contained in:
parent
dfc3f9dcd7
commit
4b382940f0
2 changed files with 7 additions and 5 deletions
|
|
@ -864,7 +864,9 @@ Future directions:
|
||||||
* Builtin regions like ``private``, ``global`` and ``local`` will
|
* Builtin regions like ``private``, ``global`` and ``local`` will
|
||||||
prove very useful for the upcoming OpenCL target.
|
prove very useful for the upcoming OpenCL target.
|
||||||
* Builtin "regions" can model ``lent`` and ``unique`` pointers.
|
* Builtin "regions" can model ``lent`` and ``unique`` pointers.
|
||||||
|
* An assignment operator can be attached to a region so that proper write
|
||||||
|
barriers can be generated. This would imply that the GC can be implemented
|
||||||
|
completely in user-space.
|
||||||
|
|
||||||
|
|
||||||
Procedural type
|
Procedural type
|
||||||
|
|
|
||||||
|
|
@ -3034,8 +3034,8 @@ proc instantiationInfo*(index = -1, fullPaths = false): tuple[
|
||||||
## result = a[pos]
|
## result = a[pos]
|
||||||
##
|
##
|
||||||
## when isMainModule:
|
## when isMainModule:
|
||||||
## testException(EInvalidIndex, tester(30))
|
## testException(IndexError, tester(30))
|
||||||
## testException(EInvalidIndex, tester(1))
|
## testException(IndexError, tester(1))
|
||||||
## # --> Test failure at example.nim:20 with 'tester(1)'
|
## # --> Test failure at example.nim:20 with 'tester(1)'
|
||||||
|
|
||||||
template currentSourcePath*: string = instantiationInfo(-1, true).filename
|
template currentSourcePath*: string = instantiationInfo(-1, true).filename
|
||||||
|
|
@ -3120,7 +3120,7 @@ template onFailedAssert*(msg: expr, code: stmt): stmt {.dirty, immediate.} =
|
||||||
##
|
##
|
||||||
## .. code-block:: nim
|
## .. code-block:: nim
|
||||||
##
|
##
|
||||||
## proc example(x: int): TErrorCode =
|
## proc example(x: int): ErrorCode =
|
||||||
## onFailedAssert(msg):
|
## onFailedAssert(msg):
|
||||||
## log msg
|
## log msg
|
||||||
## return E_FAIL
|
## return E_FAIL
|
||||||
|
|
@ -3128,7 +3128,7 @@ template onFailedAssert*(msg: expr, code: stmt): stmt {.dirty, immediate.} =
|
||||||
## assert(...)
|
## assert(...)
|
||||||
##
|
##
|
||||||
## onFailedAssert(msg):
|
## onFailedAssert(msg):
|
||||||
## raise newException(EMyException, msg)
|
## raise newException(MyError, msg)
|
||||||
##
|
##
|
||||||
## assert(...)
|
## assert(...)
|
||||||
##
|
##
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue