Skip to content

Remove proc from the language - #19338

Merged
bors merged 13 commits into
rust-lang:masterfrom
nikomatsakis:unboxed-closure-purge-the-proc
Dec 14, 2014
Merged

Remove proc from the language#19338
bors merged 13 commits into
rust-lang:masterfrom
nikomatsakis:unboxed-closure-purge-the-proc

Conversation

@nikomatsakis

Copy link
Copy Markdown
Contributor

They are replaced with unboxed closures.

cc @pcwalton@aturon

This is a [breaking-change]. Mostly, uses of proc() simply need to be converted to move|| (unboxed closures), but in some cases the adaptations required are more complex (particularly for library authors). A detailed write-up can be found here: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/

The commits are ordered to emphasize the more important changes, but are not truly standalone.

@rust-highfive

Copy link
Copy Markdown
Contributor

warningWarningwarning

  • These commits modify unsafe code. Please review it carefully!

@thestinger

Copy link
Copy Markdown
Contributor

This is awesome! I was afraid proc() was going to end up staying around as a compatibility shim.

@nikomatsakis
nikomatsakisforce-pushed the unboxed-closure-purge-the-proc branch from ab70f27 to 491d3edCompareNovember 26, 2014 16:32
@alexcrichton

Copy link
Copy Markdown
Member

@nikomatsakis could you make sure that at least one of the commits if flagged as a breaking-change along with some clear documentation of how to migrate? It would also be nice to expand a bit on migration path for the consuming side you alluded to in the description.

@alexcrichton

Copy link
Copy Markdown
Member

I added some comments to a previous set of commits, and my high level comments were:

  • I think there were a few tests that were removed but could be added back in.
  • It'd be nice to have some documentation for std::thunk::Thunk

Other than that, and the comments in the previous commits, r=me, thanks so much @nikomatsakis!

Comment threadsrc/doc/guide-tasks.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/form/from

@nikomatsakisnikomatsakis changed the title Remove proc types from the languageRemove proc from the languageNov 26, 2014
@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

Blog post explaining the high-level details: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/

@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

@alexcrichton the breaking change annotation is in the PR header, and I included a link to my blog post. I believe that shows up in the merge commit, right?

@michaelwoerister

Copy link
Copy Markdown
Member

cc me

@nikomatsakis
nikomatsakisforce-pushed the unboxed-closure-purge-the-proc branch 2 times, most recently from 7f34f06 to 79ba682CompareNovember 27, 2014 11:44
@nikomatsakis
nikomatsakisforce-pushed the unboxed-closure-purge-the-proc branch from d8405fa to d51d810CompareNovember 27, 2014 12:32
@nikomatsakis
nikomatsakisforce-pushed the unboxed-closure-purge-the-proc branch from d51d810 to a6b5350CompareNovember 27, 2014 16:33
bors added a commit that referenced this pull request Nov 28, 2014
…, r=alexcrichton
This PR lets `rustc` generate debuginfo for variables captured by unboxed closures. Fixes#19356@nikomatsakis This PR will probably conflict with #19338. If this gets merged before, you should be able to just leave the test case as it is (maybe remove the `#![feature(unboxed_closures)]` directive).
@tomakatomaka mentioned this pull request Nov 30, 2014
47 tasks
@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

Status: semi-blocked on #19438

@nikomatsakis
nikomatsakisforce-pushed the unboxed-closure-purge-the-proc branch 6 times, most recently from c876e97 to e2e8768CompareDecember 8, 2014 15:11
@nikomatsakis
nikomatsakisforce-pushed the unboxed-closure-purge-the-proc branch from 7059ad8 to f6d60f3CompareDecember 14, 2014 09:22
bors added a commit that referenced this pull request Dec 14, 2014
…oc, r=acrichto
They are replaced with unboxed closures.
cc @pcwalton@aturon This is a [breaking-change]. Mostly, uses of `proc()` simply need to be converted to `move||` (unboxed closures), but in some cases the adaptations required are more complex (particularly for library authors). A detailed write-up can be found here: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/
The commits are ordered to emphasize the more important changes, but are not truly standalone.
@borsbors closed this Dec 14, 2014
@bors
bors merged commit f6d60f3 into rust-lang:masterDec 14, 2014
@chenyukangchenyukang mentioned this pull request Jan 21, 2015
@nikomatsakis
nikomatsakis deleted the unboxed-closure-purge-the-proc branch March 30, 2016 16:17
@zesterer

Copy link
Copy Markdown
Contributor

'proc' is a very useful keyword to have, particularly when one is writing an operating system. I suggest that it should no longer be a reserved word given that it no longer has semantic meaning.

@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

@zesterer I agree. Care to open a PR? I think all you have to do is to remove this line:

(49,Proc,"proc")

If you do, add r? @nikomatsakis into the PR description.

@zesterer

Copy link
Copy Markdown
Contributor

I've never opened a Rust PR before. Have you any advice on how best to word things?

@tshepang

Copy link
Copy Markdown
Member

I would...

remove 'proc' from keyword list

'proc' is a very useful keyword to have, particularly when one is writing an operating system. It is removed from reserve keyword, given that it no longer has semantic meaning.

@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

@zesterer do you mean to word the PR description? If so, what @tshepang wrote sounds fine. We're not too formal on these sorts of things. =)

Sign up for freeto 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.

10 participants

@nikomatsakis@rust-highfive@thestinger@alexcrichton@michaelwoerister@zesterer@tshepang@laumann@sinistersnare@bors