Commit graph

19551 commits

Author SHA1 Message Date
Paul Backus
5ca44b74a5 Fix Issue 22572 - Cannot define SumType over immutable struct with Nullable
Previously, SumType incorrectly assumed that all members of an
inout(SumType) must themselves be inout-qualified. However, this is not
the case when one of those member types is declared as immutable, since
the qualifier combination `immutable inout` collapses to just
`immutable`.

Attempting to copy an immutable member type as though it were inout
caused matching to fail in SumType's copy constructor, due to the
following (gagged) error:

  Error: `inout` on `return` means `inout` must be on a parameter as
  well for `pure nothrow @nogc @safe inout(Storage)(ref immutable(Value)
  value)`
2022-02-09 22:50:10 +00:00
Paul Backus
ab4008c13f Add explanatory comment to addressOf 2022-02-07 16:29:58 +00:00
Razvan Nitu
13b6894eb6
Merge pull request #8373 from rikkimax/fix22738
Fix Issue 22738 - std.file.tempDir adds an addition / even when it already has one
2022-02-07 10:54:43 +02:00
MoonlightSentinel
a9bc8298dd win32.mak: Explicitly use 32omf instead of $(MODEL)
The makefile explicitly targets `-m32omf`, `-m32mscoff` is built by
`win64.mak`. The recent update to support `MODEL=32omf` broke support
for `MODEL=32` which used to indicate the old default (32 + OMF).

Ignoring the external `MODEL` parameter here fixes several components
(e.g. the installer repo) that rely on the old behaviour. This hack is
acceptable IMO because `win32.mak` never supported 32 + MS COFF and
will become obsolete once `-m32omf` is removed.
2022-02-06 03:02:49 +00:00
Richard Andrew Cattermole
86c7d2ebeb
s/least/lest/
Co-authored-by: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
2022-02-06 04:40:58 +13:00
rikki cattermole
0cdb54d03c s/seperator/separator/ 2022-02-06 04:39:07 +13:00
rikki cattermole
2ca70756c7 Missed some more whitespace. 2022-02-06 04:37:51 +13:00
rikki cattermole
c9cc092cb7 Remove trailing whitespace that was accidently added to std.file tempDir. 2022-02-06 04:30:51 +13:00
rikki cattermole
33e95aea02 Fix Issue 22738 - std.file.tempDir adds an addition / even when it already has one 2022-02-06 04:17:40 +13:00
Razvan Nitu
9b12b98eb1
Merge pull request #8371 from pbackus/public-import-forward
std.functional: use public import for 'forward'
2022-02-02 14:04:15 +02:00
Paul Backus
fbf8a3057a std.functional: use public import for 'forward'
When forward was moved to core.lifetime, a wrapper template was left in
std.functional for the sake of documentation. Since that wrapper
template is now undocumented, it no longer serves any purpose, and can
be removed.
2022-02-01 22:06:15 -05:00
Razvan Nitu
896b1d0e1e
Merge pull request #8364 from FeepingCreature/fix/issue-22701-remove-is-typeof-in-apply
Fix issue 22701: Remove is(typeof()) callable check in std.typecons.apply.
2022-01-29 12:00:05 +02:00
Razvan Nitu
20a88cf6a7
Merge pull request #8365 from wolframw/fix_22695
Fix Issue 22695 - std.traits.isBuiltinType is false for typeof(null)
2022-01-28 10:26:05 +02:00
wolframw
b6efe02b64
Fix Issue 22695 - std.traits.isBuiltinType is false for typeof(null) 2022-01-27 18:42:28 +01:00
wolframw
ebccda03e1 std.traits: add examples 2022-01-27 01:14:25 +00:00
Mathis Beer
ac5c8d0c85 Fix issue 22701: Remove is(typeof()) callable check in std.typecons.apply.
It creates unreadable template errors for no benefit.
2022-01-26 13:03:29 +01:00
Max Haughton
e7724164b2
Fixes issues 22185, 22673 (#8359)
Fixes issues 22185, 22673

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2022-01-26 11:24:59 +00:00
The Dlang Bot
709b8840c7
Merge pull request #8362 from dukc/killChooseRecursion
Changed chooseAmong implementation from recursive to linear.

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2022-01-26 04:39:33 +00:00
Ate Eskola
2031d0cfc7 Style fixed. 2022-01-25 22:55:43 +02:00
Ate Eskola
664e1cf2b4 Corrected initialization, thanks Radcapricorn! 2022-01-25 22:55:43 +02:00
Ate Eskola
ab547c78c3 Changed chooseAmong implementation from recursive to linear. 2022-01-25 22:55:43 +02:00
RazvanN7
bedcad87f8 Fix Issue 22704 - Linker error when running the public unittests 2022-01-25 18:48:04 +00:00
Razvan Nitu
517abbf4ac
Merge pull request #8367 from MoonlightSentinel/ci/fix-windows-default-switch
Make win32.mak compatible with MODEL=32omf
2022-01-25 18:06:38 +02:00
MoonlightSentinel
7ab3c1e435
Make win32.mak compatible with MODEL=32omf
The previous assumption was MODEL=32 because MODEL=32mscoff is built by
win64.mak.

Verified locally because Azure requires further changes outside of this
repository.
2022-01-25 17:20:51 +01:00
Razvan Nitu
b707cb7903
Merge pull request #8363 from kubo39/add-doc-for-zero-or-one-repetition
std.regex: doc: Add zero or one repetition (greedy/reluctant)
2022-01-25 14:14:30 +02:00
Atila Neves
8a2bd81b39
Move checkedint out of experimental (#8100)
Move checkedint out of experimental

Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2022-01-25 00:17:24 +00:00
Hiroki Noda
ab74189c65 std.regex: doc: Add zero or one repetition (greedy/reluctant) 2022-01-23 18:15:32 +09:00
Razvan Nitu
30de0aafba
Merge pull request #8361 from quickfur/tracegc
Fix issue 14892: std.array.array support for -profile=gc.
2022-01-19 11:10:37 +02:00
H. S. Teoh
75d7378f66 Fix issue 14892: std.array.array support for -profile=gc. 2022-01-18 11:32:13 -08:00
The Dlang Bot
a86c1eba9f
Merge pull request #6876 from thaven/enhancement/autoimplement-add-abstract-parent
Also expose 'parent' when it's abstract

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2022-01-18 03:54:04 +00:00
The Dlang Bot
263652cee6
Merge pull request #8360 from WebFreak001/is-some-finite-char-input-range
add isSomeFiniteCharInputRange as simplification

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2022-01-16 01:48:19 +00:00
WebFreak001
5c5a8318b3 fix phobos style in unittest 2022-01-16 01:07:22 +01:00
WebFreak001
dac59a4bde add isSomeFiniteCharInputRange as simplification
combines the very common constraint
`isInputRange!R && !isInfinite!R && isSomeChar!(ElementEncodingType!R)`
and adds a bunch of documentation with examples for users to understand
it better. This should lower the neccessary needed technical insight to
read basic docs, especially std.path and std.file docs.
2022-01-15 18:38:52 +01:00
Bianca Fodor
4f979130d3
Fix issue 13551 - std.conv.to for std.typecons tuples too (#8335)
Fix issue 13551 - std.conv.to for std.typecons tuples too

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2022-01-13 16:00:10 +00:00
Razvan Nitu
ba7529c469
Merge pull request #8358 from kinke/fix22619
Work around issue 22619 - Avoid Nullable copy ctor unless required
2022-01-11 10:57:54 +02:00
Martin Kinkelin
9db3a9afdf Work around issue 22619 - Avoid Nullable copy ctor unless required
Copy ctors are still buggy, so unconditionally adding one for Nullable
is everything but a non-breaking change (and was added in the 2.098.1
point release).
2022-01-10 16:48:29 +01:00
The Dlang Bot
1c1ab74538
Merge pull request #8350 from iK4tsu/fix-variant-null-comparisons
Fix Issue 22647 - [std.variant.Variant] Cannot compare types compliant with null comparison with 'null'

Signed-off-by: Luís Ferreira <contact@lsferreira.net>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2022-01-10 15:03:15 +00:00
Nick Treleaven
9f336484dc [typecons] Tweak Tuple example and split out Rebindable example 2022-01-10 14:03:09 +00:00
Jan Jurzitza
a5c3c24b71 std.stdio: clarify "not opened" documentation
when the code is `!isOpen` it now means:
- in exception documentation it's now always saying "not opened" (or similar, it's clear the file is in error state in that case)
- in general documentation it now always says "closed or not yet opened" (to avoid mistaking it with eof)
- in runtime error messages it always says "unopened"
2022-01-10 12:47:47 +00:00
Razvan Nitu
10b9721530
Merge pull request #8356 from WalterBright/fix22660
Comment out randomly failing test in std.experimental.allocator
2022-01-10 13:42:30 +02:00
João Lourenço
b901b5fb50
std.variant: Add Variant unittests for 'null' comparisons
Fix Issue #22647 - [std.variant.Variant] Cannot compare types compliant with null comparison with 'null'

Signed-off-by: João Lourenço <jlourenco5691@gmail.com>
2022-01-10 11:35:15 +00:00
João Lourenço
5f14dc0305
std.variant: Fix Variant not correctly comparring allowed types with null
Some types can be compared with 'null', for example arrays and
pointers. Not complying with this creates a difference between the
Phobo's Variant implementation and the core language behaviors which can
lead to some confusion.

Refers: #22647

Signed-off-by: João Lourenço <jlourenco5691@gmail.com>
2022-01-10 11:35:04 +00:00
Walter Bright
374eefefbf Comment out randomly failing test in std.experimental.allocator 2022-01-08 21:14:11 -08:00
MoonlightSentinel
59daf7d3b4 Azure: Replace deprecated vs2017-win2016 image with windows-2019
See https://devblogs.microsoft.com/devops/hosted-pipelines-image-deprecation/#windows
2022-01-08 20:08:16 +00:00
The Dlang Bot
fc3985a200
Merge pull request #8336 from atilaneves/logger
Fix issue 22532 - change default log level to LogLevel.warning

Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Signed-off-by: Steven Schveighoffer <schveiguy@users.noreply.github.com>
Merged-on-behalf-of: Atila Neves <atilaneves@users.noreply.github.com>
2022-01-07 08:32:30 +00:00
Gabriel Dolberg
67c546a828 ✏️ fix typos in docs 2022-01-05 22:09:24 +00:00
João Lourenço
5f1657565f std.variant: Fix incorrectly written unittets
Fix Issue 22648 - [std.variant.Variant] Incorrectly written unittests

Signed-off-by: João Lourenço <jlourenco5691@gmail.com>
2022-01-04 00:42:12 +00:00
Atila Neves
522f953ae1 Add comment saying that the default log level is LogLevel.warning 2022-01-03 18:34:51 +01:00
Atila Neves
230cee2f7d Add to the changelog 2022-01-03 15:14:33 +01:00
Atila Neves
13eff04704 Address review comments 2022-01-03 15:14:33 +01:00