Skip to content
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

Clean out deprecated functionality #18070

Merged
merged 3 commits into from
Oct 20, 2014
Merged

Conversation

alexcrichton
Copy link
Member

This is a large spring-cleaning commit now that the 0.12.0 release has passed removing an amount of deprecated functionality. This removes a number of deprecated crates (all still available as cargo packages in the rust-lang organization) as well as a slew of deprecated functions. All #[crate_id] support has also been removed.

I tried to avoid anything that was recently deprecated, but I may have missed something! The major pain points of this commit is the fact that rustc/syntax have #[allow(deprecated)], but I've removed that annotation so moving forward they should be cleaned up as we go.

@rust-highfive
Copy link
Collaborator

warning Warning warning

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

@Gankra
Copy link
Contributor

Gankra commented Oct 15, 2014

😍 this is too big for github or my phone to render, but what does render before it locks up makes me sooo happy.

@alexcrichton alexcrichton force-pushed the spring-cleaning branch 2 times, most recently from 43555a7 to 1ee4848 Compare October 15, 2014 19:01
@aturon
Copy link
Member

aturon commented Oct 15, 2014

There are a handful of places where it looks like you are doing an extra * because the Index and Deref traits aren't playing well together. That should be fixed soon.

@alexcrichton
Copy link
Member Author

Yeah the most commons places were Rc<Vec<T>> and Ref<Vec<T>> which required (*foo)[index], which was quite annoying! It'll be super awesome to have that issue fixed. (#16821 I presume)

@aturon
Copy link
Member

aturon commented Oct 15, 2014

@alexcrichton Yep, that's the issue. Both @pcwalton and @nikomatsakis have various changes in PRs or nearly so that will hopefully close this out.

@aturon
Copy link
Member

aturon commented Oct 15, 2014

OK, I read through this fairly carefully and it looks good to me. It's interesting seeing the ergonomic impact of these changes -- on the whole, neutral I'd say.

@alexcrichton
Copy link
Member Author

I found that foo.get(&bar) is just about as noisy as (*foo)[bar], but any time I could change *vec.get(i) to vec[i] I was quite happy!

In general though, I would agree that I didn't feel that the ergonomic improvement was too large. This was mostly just propagating old deprecations into libsyntax/librustc though, so not too much we didn't already know!

@aturon
Copy link
Member

aturon commented Oct 15, 2014

Yep -- I was just somewhat worried about ergonomic regressions since we've removed a fair number of convenience methods.

@alexcrichton
Copy link
Member Author

Ah! Along those lines the most painful I found were the removal of append and append_one which various places in rustc made liberal use of. The removal of get_{,mut_}ref() was a tiny bit annoying, but overall not so bad.

@aturon
Copy link
Member

aturon commented Oct 15, 2014

Yeah, the append case was interesting. Definitely worth looking into a more general way to do this kind of thing in the future.

@alexcrichton alexcrichton force-pushed the spring-cleaning branch 2 times, most recently from 2bb09b5 to 5c9e486 Compare October 15, 2014 22:31
@huonw
Copy link
Member

huonw commented Oct 17, 2014

(Needs a rebase.)

bors added a commit that referenced this pull request Oct 18, 2014
This is a large spring-cleaning commit now that the 0.12.0 release has passed removing an amount of deprecated functionality. This removes a number of deprecated crates (all still available as cargo packages in the rust-lang organization) as well as a slew of deprecated functions. All `#[crate_id]` support has also been removed.

I tried to avoid anything that was recently deprecated, but I may have missed something! The major pain points of this commit is the fact that rustc/syntax have `#[allow(deprecated)]`, but I've removed that annotation so moving forward they should be cleaned up as we go.
@sfackler
Copy link
Member

Needs a rebase

@alexcrichton alexcrichton force-pushed the spring-cleaning branch 2 times, most recently from df4c7c9 to 608d81e Compare October 19, 2014 02:20
All of these crates have been deprecated for some time and properly live in the
rust-lang organization as cargo-based crates.

To update your code, depend on the rust-lang/foo repository via cargo.

[breaking-change]
Spring cleaning is here! In the Fall! This commit removes quite a large amount
of deprecated functionality from the standard libraries. I tried to ensure that
only old deprecated functionality was removed.

This is removing lots and lots of deprecated features, so this is a breaking
change. Please consult the deprecation messages of the deleted code to see how
to migrate code forward if it still needs migration.

[breaking-change]
bors added a commit that referenced this pull request Oct 20, 2014
This is a large spring-cleaning commit now that the 0.12.0 release has passed removing an amount of deprecated functionality. This removes a number of deprecated crates (all still available as cargo packages in the rust-lang organization) as well as a slew of deprecated functions. All `#[crate_id]` support has also been removed.

I tried to avoid anything that was recently deprecated, but I may have missed something! The major pain points of this commit is the fact that rustc/syntax have `#[allow(deprecated)]`, but I've removed that annotation so moving forward they should be cleaned up as we go.
@bors bors closed this Oct 20, 2014
@bors bors merged commit 96445a5 into rust-lang:master Oct 20, 2014
@alexcrichton alexcrichton deleted the spring-cleaning branch October 20, 2014 17:53
@pnkfelix
Copy link
Member

(I'm a little unhappy this landed before #16821 was fixed ... I find (*recv)[index] to be much worse than recv.get(index) when the recv expression is complicated, which happens a bit in the compiler source... )

@aturon
Copy link
Member

aturon commented Oct 21, 2014

@pnkfelix Yes, that was one of the ergonomic regressions in this patch. I don't think there were too many instances, and it should be quite easy to grep for this pattern after the problem is resolved (which we should do anyway.)

@nikomatsakis
Copy link
Contributor

On Wed, Oct 15, 2014 at 01:24:35PM -0700, Alex Crichton wrote:

I found that foo.get(&bar) is just about as noisy as (*foo)[bar], but any time I could change *vec.get(i) to vec[i] I was quite happy!

Note that [] is supposed to autoderef, so (*foo)[bar] ought to be foo[bar], which is way better. I am working on a patch for this
(as part of fixing #4920).

@nrc
Copy link
Member

nrc commented Nov 23, 2014

why was librustc/middle/save removed? It is not deprecated

@nrc
Copy link
Member

nrc commented Nov 23, 2014

oops, sorry, wrong PR :-s

Sign up for free to 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