Commit Graph

1628 Commits

Author SHA1 Message Date
Juan Carlos
2bfabfde49 Fix #15806
(cherry picked from commit 3cebae492e)
2020-11-16 07:28:26 +01:00
Juan Carlos
d4ce6acfed Fix #15806
(cherry picked from commit d0dda9efab)
2020-11-16 07:27:32 +01:00
flywind
11f6fd88ea minor
(cherry picked from commit bfa387d384)
2020-11-16 07:27:25 +01:00
flywind
452203a28e [docs minor]add some tips yo intern.rst
(cherry picked from commit 5af798c21b)
2020-11-16 07:27:20 +01:00
Timothee Cour
b47a98f7f2 targets: use cpp instead of c++ everywhere (was by far the most common) (#15961)
(cherry picked from commit 96930b9cae)
2020-11-16 07:25:54 +01:00
narimiran
d10f841b60 nimdoc: items of ordered lists now have numbers instead of circles
(cherry picked from commit f02c7542fc)
2020-11-16 06:55:32 +01:00
narimiran
1781848122 remove codeowners [ci skip]
(cherry picked from commit b831033db6)
2020-11-16 06:55:25 +01:00
Aethylia
244f3f62ce Added [:T] syntax explanation to generics tutorial. (#15890)
* Added [:T] syntax explanation to generics tutorial.

* Update doc/tut2.rst

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* Update doc/tut2.rst

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* Made second generics example runnable and added test line.

* Update doc/tut2.rst

* Update doc/tut2.rst

* Update doc/tut2.rst

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
(cherry picked from commit 53eca459f1)
2020-11-09 16:26:00 +01:00
n5m
e7e33b14b5 improve Testament docs (#15881)
* fix mentions of recursive test discovery

* document that {.fatal.} pragmas cannot be caught

(cherry picked from commit 3bff12b966)
2020-11-09 16:25:07 +01:00
n5m
12145adecd include example of error-marked copy proc (#15886)
* include example of error-marked copy proc

* Update destructors.rst

(cherry picked from commit 3be404af04)
2020-11-09 16:23:45 +01:00
c-blake
2443b40623 Clarify the sense in which Nim supports recursive iterators in the (#15834)
manual, the tutorial, and the `tbintree` test.

(cherry picked from commit f17555770e)
2020-11-05 09:19:35 +01:00
Clyybber
5e7c6b7f7e Typos
(cherry picked from commit 1eb4a38a50)
2020-11-05 09:12:33 +01:00
n5m
0699b57402 improve public Testament docs (#15710)
* improve glob docs

* punctuation

* move spec descriptions above example

notably, change the description of timeout to reference seconds, not microseconds

* document nimout

* document sortoutput

* explain the action options

(cherry picked from commit bcb30566fc)
2020-11-05 09:12:26 +01:00
Yanis Zafirópulos
a7bd58ed07 Massive documentation fixes + copy editing (#15747)
(cherry picked from commit 0cae8ef2ca)
2020-11-05 09:07:07 +01:00
Tim Smith
4a95d45b28 Spelling and Grammer fixes (#15719)
Co-authored-by: Tim Smith <tim.smith.hdg@gmail.com>
Co-authored-by: Miran <narimiran@disroot.org>
(cherry picked from commit 485d4ff802)
2020-11-05 09:07:01 +01:00
Xavier Noria
1fbfd77580 Document implicit return values from procedures (#15738)
(cherry picked from commit 25955440df)
2020-11-05 09:03:57 +01:00
Yanis Zafirópulos
513ced8966 Copy editing (#15733)
(cherry picked from commit ae8eb1ec3d)
2020-10-27 09:05:46 +01:00
Miran
6d99de7c2c [backport: 1.4] Better linebreaks (#15658)
(cherry picked from commit d8a6b0b04e)
2020-10-22 20:20:49 +02:00
Gampol T
bc5c6c812b Fix #13609 (#15567)
* add documentation that discardable pragma cannot use on template

* Update doc/manual.rst

Co-authored-by: Euan <euantorano@users.noreply.github.com>

* Update doc/manual.rst

Co-authored-by: Euan <euantorano@users.noreply.github.com>

Co-authored-by: Euan <euantorano@users.noreply.github.com>
(cherry picked from commit b2f51e2950)
2020-10-22 20:19:23 +02:00
Tomáš Hübelbauer
293ef09b49 Remove bit about opening files not raising (#15654)
Resolved #473

I am removing this bit because this advice to not throw on recoverable-from cases like a file failing to open is actually not respected by Nim standard library. `readFile` and `readLines` both throw and exceptions must be used as a method of control flow for the recovery from that. There are alternatives, like opening a file handle instead of using these helpers, but that's less convenient than these helper methods for cases where you really want to just slurp up a file to memory and use a fallback value if it doesn't exist or is for whatever reason not readable.

(cherry picked from commit 725c7caa02)
2020-10-21 11:07:33 +02:00
narimiran
8fb501b52c more "eg" fixes
(cherry picked from commit 5e9dd81baa)
2020-10-21 11:06:50 +02:00
narimiran
c087e2d8de it is not "eg", it is "e.g."
(cherry picked from commit 0a686659d2)
2020-10-21 11:06:28 +02:00
n5m
1d63995896 fix #15631 (#15632)
* trigger valgrind failure on memory leak

* remove non-malloc tests

* remove ORC test

is redundant because we already have an ARC test

* only run valgrind tests on 64-bit Linux

* disable freebsd and openbsd

* Remove tleak_refc

As to not test implementation details (or bug)

* Fix test failures by removing redundant test

Since this tests/shoulfail/tvalgrind.nim was specified here to fail this test
itself fails since it will be skipped on non-linux CI

* Remove test, reason detailed in the previous commit

* Remove redundant disables

* Revert removing disables

* Add and use valgrind: leaks

* Fix

Co-authored-by: Clyybber <darkmine956@gmail.com>
Co-authored-by: n5m
(cherry picked from commit 436e1fa5b1)
2020-10-21 11:03:17 +02:00
n5m
a222aa14e1 document that Nim executable must be included (#15611)
(cherry picked from commit b16b2eb06f)
2020-10-21 10:59:20 +02:00
Andreas Rumpf
da4aa2e1fb renamed '=' to '=copy' [backport:1.2] (#15585)
* Assign hook name changed to `=copy`
* Adapt destructors.rst
* [nobackport] Duplicate tests for =copy hook
* Fix tests
* added a changelog entry

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-10-15 12:52:30 +02:00
Andreas Rumpf
51e3e0c7c4 implements https://github.com/nim-lang/RFCs/issues/260 (#15505)
* implements https://github.com/nim-lang/RFCs/issues/260

* added a test case
2020-10-07 00:09:28 +02:00
Andreas Rumpf
92163fa330 implements https://github.com/nim-lang/RFCs/issues/258 (#15503)
* implements https://github.com/nim-lang/RFCs/issues/258

* don't be too strict with custom pragma blocks

* cast pragmas: documentation

* added most missing inference query procs to effecttraits.nim
2020-10-06 16:47:15 +02:00
David Krause
f25ca0d304 added testament documentation link to tools.rst (#15481) 2020-10-05 17:04:47 +02:00
Miran
112b11c154 group procs of the same name in TOC (#15487)
* group procs of the same name in TOC

* correctly show `sink` parameters in TOC

* no need to reinvent the wheel - `mgetorPut` exists

* better setting of text color [ci skip]

* fix CSS for better alignment
2020-10-05 17:03:14 +02:00
Clyybber
37e0d6f32d Fix typo 2020-10-01 19:58:53 +02:00
Clyybber
800d6204cd Fix "arraq" typo :) 2020-10-01 19:58:08 +02:00
cooldome
531ed2dc36 fix #15405. deepcopy arc (#15410)
* fix #15405
* fix tests
* deepcopy for ARC has to be enabled via --deepcopy:on

Co-authored-by: Araq <rumpf_a@web.de>
2020-10-01 17:39:48 +02:00
Andreas Rumpf
ab405c936e views: yet another bugfix (#15447)
* views: yet another bugfix

* views: extended the spec

* views: take into account potential hidden mutations via proc calls
2020-10-01 15:04:36 +02:00
Andreas Rumpf
4058801607 spec for view types (#15424)
* spec for view types
* spec additions
* refactoring; there are two different kinds of views
* refactorings and spec additions
* enforce that view types are initialized
* enforce borrowing from the first formal parameter
* enforce lifetimes for borrowing of locals
* typo in the manual
* clarify in the implementation what a borrow operation really is
2020-09-29 23:42:38 +02:00
Andreas Rumpf
50b6f6996a .noalias annotation; frontend support (#15419)
* .noalias annotation; frontend support

* added .noalias support to Nim; implements https://github.com/nim-lang/RFCs/issues/204
2020-09-28 13:51:39 +02:00
hlaaftana
0ea559611d Fix proc generic params ident defs, missing empty (#15412) 2020-09-27 19:47:58 +02:00
Miran
2de6e18774 fix #11537, correct parse inline code without surrounding spaces (#15399) 2020-09-25 09:25:47 +02:00
Miran
fe3211fbcf fix the indentation in --help and --fullhelp (#15387)
* fix the indentation in `--help` and `--fullhelp`

* a better way to fix it
2020-09-23 12:44:41 +02:00
Miran
11c377c114 add enumerate macro (#15297)
* add `enumerate` macro

* address the comments

* put `enumerate` in its own module
2020-09-22 13:08:36 +02:00
Juan Carlos
db9ab2a4c0 Documentation prelude (#15377) 2020-09-21 12:37:14 +02:00
Miran
cbd78ec1f6 close #6071, remove the mentions of deprecated docSeeSrcUrl (#15350) 2020-09-17 19:55:18 +02:00
Juan Carlos
913ffbb92d Add documentation for Testament (#15344) 2020-09-16 21:31:35 +02:00
flywind
0aaf4e2dfa Methods docs improvement (#15338)
* docs improvement

* minor
2020-09-16 14:51:01 +02:00
Juan Carlos
073bea6606 Remove Deprecated {.this:self.} from Documentation so people dont use it anymore (#15328) 2020-09-15 11:59:33 +02:00
narimiran
8a2cd7b24b [ci skip] fix typo in the manual 2020-09-09 12:59:14 +02:00
Andreas Rumpf
10988d4840 borrow checking (#15282)
* refactoring: move procs to typeallowed.nim
* frontend preparations for first class openArray support
* prepare the code generator for first class openArray
* code generation for first class openArray; WIP
* code generation for open arrays, progress
* added isViewType proc
* preparations for borrow checking
* added borrow checking to the front end
2020-09-09 07:32:03 +02:00
Miran
c49b88163c "for-loop macros" are no longer an experimental feature (#15288) 2020-09-08 14:25:25 +02:00
Clyybber
fb58066b61 Fix #5691 (#15158)
* Fix #5691
* Cleanup and thoughts
* Use scope approach
* Seperate defined/declared/declaredInScope magics
* Fix declaredInScope
* Update spec accordingly
2020-08-27 15:50:59 +02:00
alaviss
575697e1f4 doc/nimdoc.css: align field names to the right (#15217) 2020-08-23 09:48:37 +02:00
Ico Doornekamp
2260ede247 Added array type definition to manual (#15173)
Co-authored-by: Ico Doornekamp <git@zevv.nl>
2020-08-10 14:01:47 +02:00