Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suppress incorrect var T destructor warnings for newFinalizer in stdlib #22810

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

ringabout
Copy link
Member

in std/nre

proc initRegex(pattern: string, flags: int, study = true): Regex =
  new(result, destroyRegex)

gives incorrect warnings like

C:\Users\blue\Documents\Nim\lib\impure\nre.nim(252, 6) Error: A custom '=destroy' hook which takes a 'var T' parameter is deprecated; it should take a 'T' parameter [Deprecated

in `std/nre`
```nim
proc initRegex(pattern: string, flags: int, study = true): Regex =
  new(result, destroyRegex)
```
gives incorrect warnings like

```
C:\Users\blue\Documents\Nim\lib\impure\nre.nim(252, 6) Error: A custom '=destroy' hook which takes a 'var T' parameter is deprecated; it should take a 'T' parameter [Deprecated
```
@ringabout ringabout marked this pull request as ready for review October 10, 2023 14:17
@ringabout ringabout changed the title suppress uncorrect var T destructor warnings for newFinalizer suppress incorrect var T destructor warnings for newFinalizer in stdlib Oct 10, 2023
@Araq Araq merged commit 14d25ee into devel Oct 11, 2023
22 checks passed
@Araq Araq deleted the ringabout-patch-8 branch October 11, 2023 11:27
@github-actions
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 14d25ee

Hint: mm: orc; opt: speed; options: -d:release
170206 lines; 9.417s; 620.082MiB peakmem

narimiran pushed a commit that referenced this pull request Apr 18, 2024
…ib (#22810)

in `std/nre`
```nim
proc initRegex(pattern: string, flags: int, study = true): Regex =
  new(result, destroyRegex)
```
gives incorrect warnings like

```
C:\Users\blue\Documents\Nim\lib\impure\nre.nim(252, 6) Error: A custom '=destroy' hook which takes a 'var T' parameter is deprecated; it should take a 'T' parameter [Deprecated
```

(cherry picked from commit 14d25ee)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants