dmd icon indicating copy to clipboard operation
dmd copied to clipboard

implement move constructor

Open WalterBright opened this issue 1 year ago • 9 comments

https://github.com/WalterBright/DIPs/blob/master/DIPs/DIP1040.md

WalterBright avatar Sep 24 '24 09:09 WalterBright

Thanks for your pull request, @WalterBright!

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 + dmd#16876"

dlang-bot avatar Sep 24 '24 09:09 dlang-bot

Oh bother. The current crashes are because of a bad merge.

WalterBright avatar Oct 02 '24 23:10 WalterBright

What is that osthread.d change doing there? I didn't change it. How do I get back my work before the rebase?

WalterBright avatar Oct 03 '24 00:10 WalterBright

What is that osthread.d change doing there? I didn't change it. How do I get back my work before the rebase?

You can access it via git reflog. Then use git reset --hard with the corresponding reference to put your branch back into that state (though make sure there are no local changes, they will be deleted).

tgehr avatar Oct 03 '24 00:10 tgehr

@tgehr can you please show me exactly what to type in? i.e. "the corresponding reference"

WalterBright avatar Oct 03 '24 01:10 WalterBright

@tgehr can you please show me exactly what to type in? i.e. "the corresponding reference"

Well it depends on the output of the first command, but let's look at an example on my unpacking branch:

$ git reflog
e5cfcd6303 (HEAD -> unpacking, github/unpacking) HEAD@{0}: rebase (continue) (finish): returning to refs/heads/unpacking
e5cfcd6303 (HEAD -> unpacking, github/unpacking) HEAD@{1}: rebase (continue) (pick): Semantic analysis for UnpackDeclaration in function literal parameter.
165cc88bbb HEAD@{2}: rebase (continue) (pick): Parse UnpackDeclaration as a function literal parameter.
357d937fa7 HEAD@{3}: rebase (continue) (pick): Semantic analysis for UnpackDeclaration in foreach variable.
ca5f01488d HEAD@{4}: rebase (continue) (pick): Parse UnpackDeclaration as foreach variable.
30c48372d5 HEAD@{5}: rebase (continue) (pick): Add UnpackDeclaration to Parameter.
0f64876bb5 HEAD@{6}: rebase (continue): Semantic analysis for UnpackDeclaration.
59856c21e7 HEAD@{7}: rebase: fast-forward
08581d3625 HEAD@{8}: rebase (start): checkout master
27cb7dba80 HEAD@{9}: pull github unpacking: Fast-forward
...

The commit before rebase is the one below the one with rebase (start). Its reference is either 27cb7dba80 or HEAD@{9}, both work.

Therefore, to undo my last git rebase master, I would have to do:

git reset --hard 27cb7dba80 

or, alternatively:

git reset --hard HEAD@{9}

tgehr avatar Oct 03 '24 01:10 tgehr

@tgehr thanks! Will give it a go.

WalterBright avatar Oct 03 '24 01:10 WalterBright

I've got it back! Yay! Thanks, @tgehr

WalterBright avatar Oct 03 '24 01:10 WalterBright

Spec PR: https://github.com/dlang/dlang.org/pull/3918

WalterBright avatar Oct 10 '24 03:10 WalterBright

Replaced by #17050

WalterBright avatar Feb 24 '25 08:02 WalterBright