remove the merge pragma and obsolete comments (#20254)
remove the merge pragma which has been deprecated for seven years
This commit is contained in:
parent
70a8e0d65c
commit
2494470459
1 changed files with 4 additions and 7 deletions
|
|
@ -1055,33 +1055,30 @@ proc newStringOfCap*(cap: Natural): string {.
|
|||
## be achieved with the `&` operator or with `add`.
|
||||
|
||||
proc `&`*(x: string, y: char): string {.
|
||||
magic: "ConStrStr", noSideEffect, merge.}
|
||||
magic: "ConStrStr", noSideEffect.}
|
||||
## Concatenates `x` with `y`.
|
||||
##
|
||||
## .. code-block:: Nim
|
||||
## assert("ab" & 'c' == "abc")
|
||||
proc `&`*(x, y: char): string {.
|
||||
magic: "ConStrStr", noSideEffect, merge.}
|
||||
magic: "ConStrStr", noSideEffect.}
|
||||
## Concatenates characters `x` and `y` into a string.
|
||||
##
|
||||
## .. code-block:: Nim
|
||||
## assert('a' & 'b' == "ab")
|
||||
proc `&`*(x, y: string): string {.
|
||||
magic: "ConStrStr", noSideEffect, merge.}
|
||||
magic: "ConStrStr", noSideEffect.}
|
||||
## Concatenates strings `x` and `y`.
|
||||
##
|
||||
## .. code-block:: Nim
|
||||
## assert("ab" & "cd" == "abcd")
|
||||
proc `&`*(x: char, y: string): string {.
|
||||
magic: "ConStrStr", noSideEffect, merge.}
|
||||
magic: "ConStrStr", noSideEffect.}
|
||||
## Concatenates `x` with `y`.
|
||||
##
|
||||
## .. code-block:: Nim
|
||||
## assert('a' & "bc" == "abc")
|
||||
|
||||
# implementation note: These must all have the same magic value "ConStrStr" so
|
||||
# that the merge optimization works properly.
|
||||
|
||||
proc add*(x: var string, y: char) {.magic: "AppendStrCh", noSideEffect.}
|
||||
## Appends `y` to `x` in place.
|
||||
##
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue