Commit graph

282 commits

Author SHA1 Message Date
Timothee Cour
7bce1f8578
close #13373 document (ref Foo)(a: 1) (#17804) 2021-04-21 07:33:56 +02:00
Timothee Cour
ceadf54d76
iterable[T] (#17196)
* fix failing test toSeq in manual which now works
* changelog
* reject proc fn(a: iterable)
* add iterable to spec
* remove MCS/UFCS limitation that now works
2021-04-11 14:25:41 +02:00
Andrey Makarov
3aaec0647b
turn on syntax highlighting in Manual & Tutorial (#17692)
* turn on syntax highlighting in Manual & Tutorial

* avoid highlighting of "method"

* use relative path

* 2 more changes
2021-04-11 10:23:08 +02:00
Andreas Rumpf
4d3f9d3536
manual: minor improvements (#17677)
* manual: minor improvements

* Update doc/manual.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-04-08 17:46:51 +02:00
flywind
2365b5250e
docs: note regarding emit with backticks (#17608) 2021-04-01 21:06:50 -07:00
narimiran
0be7f854ed [ci skip] correct indentation this time 2021-03-31 13:45:14 +02:00
narimiran
d3529d0d5a [ci skip] minor: fix indentation in manual.rst 2021-03-31 13:34:32 +02:00
Timothee Cour
bbe4cf4703
followup custom literals (#17500) 2021-03-27 12:03:14 -07:00
Andreas Rumpf
355985ac89
custom integer literals bugfixes (#17499)
* custom integer literals bugfixes

* make nimsuggest compile again
2021-03-24 22:29:42 +01:00
Andreas Rumpf
5f5a92379f
custom integer literals (#17489)
* user defined integer literals; refs #17020
* updated renderer.nim
* use mlexerutils helper
* imported all test cases from https://github.com/nim-lang/Nim/pull/17020
* final grammar updated
2021-03-24 14:46:19 +01:00
Andreas Rumpf
86af2f7b50
make unary minus part of number literals, refs #17020 (#17488)
* make unary minus part of number literals, refs #17020
* fixes regression
2021-03-24 09:47:11 +01:00
quantimnot
15586c7a7a
RST backtick refactor manual.rst (#17259)
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-03-18 16:59:01 -07:00
flywind
2e730f1452
rename channels to channels_builtin (#17330)
* improve test coverage for isolation

* a bit better

* rename channels to channels_builtin
2021-03-12 13:04:32 +01:00
Andrey Makarov
d97bf4f1c8
fix RST parsing when no indent after enum.item (fix #17249) (#17257) 2021-03-12 08:33:21 +01:00
Andreas Rumpf
2f213db7ee
fixes #11225; generic sandwich problems; [backport:1.2] (#17255)
* fixes #11225; generic sandwich problems; [backport:1.2]
* progress
* delegating these symbols must be done via 'bind'
2021-03-09 20:19:24 +01:00
Danil Yarantsev
56461c280f
Change stdlib imports to use std prefix in most examples (#17202) 2021-02-28 13:17:19 -08:00
Timothee Cour
e9f12dd89e
document ; vs , for generic params (#17192) 2021-02-26 16:14:25 +01:00
Timothee Cour
74a8f23801
document type bound operators (#17063)
* document type bound rountines
* address comments
* Update doc/manual.rst

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-02-23 13:52:20 +01:00
flywind
69a78c9183
promote std prefix in docs (#17128) 2021-02-20 22:38:29 -08:00
Timothee Cour
1018f51fce
workaround #17091: manual.rst now renders as RST in github (#17092) 2021-02-19 15:35:34 +01:00
Juan Carlos
68ef0c6c5b
Deprecate any (#16920) 2021-02-08 19:21:17 -08:00
Timothee Cour
e112974920
fix #16752: threadvar now works with importcpp types; osx now uses native TLS (--tlsEmulation:off), which can be orders of magnitude faster (#16750)
* osx now uses native TLS, which can be orders of magnitude faster

* add {.cppNonPod.}

* improve test

* changelog, docs, disable part of windows test
2021-01-27 22:35:43 +01:00
Elliot Waite
0436a7cffd
Make small text changes in the docs (#16634)
* Fix broken links in docs

* Fix rand HSlice links

* Make small text changes in the docs

* Fix typo in contributing docs
2021-01-25 14:59:19 +01:00
Timothee Cour
eae3bdf8fe
fix code-block (#16799) 2021-01-23 08:01:34 +01:00
Timothee Cour
8f62cd512c
fix manual to reflect reality for .nosideeffect (#16781) 2021-01-22 20:04:48 +01:00
Timothee Cour
14730d9d64
fix noDecl => nodecl (#16760)
* fix noDecl => nodecl

* address comment

* disable flaky tests/stdlib/thttpclient.nim on freebsd
2021-01-20 11:08:42 +01:00
Andrey Makarov
554fe8f88f
conservative approach to fix #15184 (#16723) 2021-01-15 00:53:36 +01:00
flywind
732419ae90
improve examples in manual (#16497)
* improve examples in manual

* Update doc/manual.rst

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update tests/cpp/ttemplatetype.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-12-29 13:44:48 +01:00
Code Hz
90dbb6f3fb
removing out T from docs since it no longer working (#16378) [backport]
* remove `out T` from docs

see https://github.com/nim-lang/Nim/issues/16131

* remove `out T` in title
* remove entire paragraph
2020-12-18 10:40:43 +01:00
Elliot Waite
f3d57761ab
Fix broken links in docs (#16336)
* Fix broken links in docs

* Fix rand HSlice links
2020-12-14 20:13:12 +01:00
ihlec
5c23ba7545
fixed article duplication typos (#16216) 2020-12-02 09:15:29 +01:00
Timothee Cour
50d035b789
defer: improve manual, clarify difference wrt try/finally (#16010) 2020-11-17 08:40:17 +01:00
Juan Carlos
1b9f37c6dc https://github.com/nim-lang/Nim/pull/15968/files#r523468677 2020-11-14 19:57:06 -03:00
Juan Carlos
c56a6133bb Fix #15806 2020-11-14 15:45:13 -03:00
Juan Carlos
9ab1a86b5b Fix #15806 2020-11-14 15:43:31 -03:00
Juan Carlos
3cebae492e Fix #15806 2020-11-14 15:39:03 -03:00
Juan Carlos
d0dda9efab Fix #15806 2020-11-14 15:31:59 -03:00
flywind
4663319bf5
follow #8463 #14157 and document cstring literals modification is not allowed (#15878)
* follow #8463 #14157 and document cstring literals
* Update doc/manual.rst

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-11-12 15:28:45 +01:00
flywind
5828620d47
uint and uint64 is Ordinal type since nim 1.0.0 (#15873) 2020-11-07 07:58:52 +00:00
Ivan Bobev
3c85aa9e53
Make {.requiresInit.} to work for distinct types (#15869)
Make `requiresInit` pragma to work for distinct types in addition to
objects. Tagging of distinct types with `requiresInit` pragma was
already supported, but its impact wasn't applied. Now its behavior when
applied on distinct types is as follows.

Given the following distinct type definitions:

  ```nim
  type
    DistinctObject {.requiresInit, borrow: `.`.} = distinct MyObject
    DistinctString {.requiresInit.} = distinct string
  ```

The following code blocks will fail to compile:

  ```nim
  var foo: DistinctFoo
  foo.x = "test"
  doAssert foo.x == "test"
  ```

  ```nim
  var s: DistinctString
  s = "test"
  doAssert s == "test"
  ```

But these ones will compile successfully:

  ```nim
  let foo = DistinctFoo(Foo(x: "test"))
  doAssert foo.x == "test"
  ```

  ```nim
  let s = "test"
  doAssert s == "test"
  ```
2020-11-06 18:56:09 +00:00
c-blake
f17555770e
Clarify the sense in which Nim supports recursive iterators in the (#15834)
manual, the tutorial, and the `tbintree` test.
2020-11-04 16:56:22 +01:00
Yanis Zafirópulos
0cae8ef2ca
Massive documentation fixes + copy editing (#15747) 2020-10-29 10:33:47 +01:00
Gampol T
b2f51e2950
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>
2020-10-21 23:40:45 -04:00
narimiran
5e9dd81baa more "eg" fixes 2020-10-20 10:51:50 +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
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
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
flywind
0aaf4e2dfa
Methods docs improvement (#15338)
* docs improvement

* minor
2020-09-16 14:51:01 +02:00
narimiran
8a2cd7b24b [ci skip] fix typo in the manual 2020-09-09 12:59:14 +02:00