phobos
phobos copied to clipboard
std.typecons: Greatly simplify scoped()
The previous implementation was just terrible, presumably dating back to when align(N)
was buggy.
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Please verify that your PR follows this checklist:
- My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
- My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
- I have provided a detailed rationale explaining my changes
- New or modified functions have Ddoc comments (with
Params:
andReturns:
)
Please see CONTRIBUTING.md for more information.
If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.
Bugzilla references
Your PR doesn't reference any Bugzilla issue.
If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
Testing this PR locally
If you don't have a local development environment setup, you can use Digger to test this PR:
dub run digger -- build "master + phobos#8460"
FYI @ljmf00.
Ahhhhhgg, we are having the same problem as the TLS alignment on druntime.
Yeah, looks like there's a corresponding DMD backend issue for 32-bit COFF too. :(
Blocked by https://issues.dlang.org/show_bug.cgi?id=16098.
@kinke Windows CI tests are failing:
object.Error@(0): Access Violation
----------------
0x02A3E8ED in rt_finalize2
0x019AF400 in object.destroy!(false, std.typecons.__unittest_L8826_C9.C1long).destroy at D:\a\1\dmd\druntime\import\object.d(4154)
0x019C8577 in std.typecons.__unittest_L8826_C9.alignmentTest at D:\a\1\phobos\std\typecons.d(8856)
0x019C8526 in std.typecons.__unittest_L8826_C9 at D:\a\1\phobos\std\typecons.d(8874)
0x02A4FCB3 in int object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)).__lambda2(immutable(object.ModuleInfo*))
0x02A4D0A6 in _d_run_main2
0x02A37234 in _d_run_main
0x00FBEECC in unittest._d_cmain!().main at D:\a\1\dmd\druntime\import\core\internal\entrypoint.d(30)
0x771105C9 in BaseThreadInitThunk
0x776E784D in RtlGetAppContainerNamedObjectPath
0x776E781D in RtlGetAppContainerNamedObjectPath
1/133 modules FAILED unittests
Yeah, same issue as ~a year ago. I assumed the compiler fix for https://issues.dlang.org/show_bug.cgi?id=16098 finally fixed this for DMD, but no it didn't.