From 24944704599ee0f6558c5cf1f7394901c5099813 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Mon, 22 Aug 2022 04:56:35 +0800 Subject: [PATCH] remove the merge pragma and obsolete comments (#20254) remove the merge pragma which has been deprecated for seven years --- lib/system.nim | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/system.nim b/lib/system.nim index 5307bec4f..16c498c85 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -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. ##