-
-
Notifications
You must be signed in to change notification settings - Fork 700
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
co-locate overloads of std.algorithm.mutation.swap() #8951
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request, @WalterBright! Bugzilla referencesYour 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 locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#8951" |
67246e1
to
41a1d0f
Compare
Gave up on the own message and the merge. Just co-located them. |
41a1d0f
to
d3924f2
Compare
dstyle fails with no message. |
It looks like DScanner was stuck in a loop for an hour and got terminated |
Co-authored-by: Dennis <[email protected]>
@@ -2837,6 +2837,13 @@ Params: | |||
lhs = Data to be swapped with `rhs`. | |||
rhs = Data to be swapped with `lhs`. | |||
*/ | |||
void swap(T)(ref T lhs, ref T rhs) | |||
if (is(typeof(lhs.proxySwap(rhs)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D-scanner wants the if to be aligned with the function declaration.
The two overloads are widely separated. This puts them together for easier study. The changes are mostly indenting.
Also has its own error message rather than the compiler generated one.