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

std: Remove deprecated functionality from 1.5 #30182

Merged
merged 1 commit into from
Dec 10, 2015

Conversation

alexcrichton
Copy link
Member

This is a standard "clean out libstd" commit which removes all 1.5-and-before
deprecated functionality as it's now all been deprecated for at least one entire
cycle.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton alexcrichton force-pushed the remove-deprecated branch 2 times, most recently from ec12c9e to b6189aa Compare December 3, 2015 01:12
@alexcrichton
Copy link
Member Author

r? @aturon

Note that this does not attempt to remove std::dynamic_lib just yet, that'll require some more effort b/c it's used in the compiler and I think some tests right now.

@rust-highfive rust-highfive assigned aturon and unassigned nikomatsakis Dec 3, 2015
#[unstable(feature = "range_inclusive",
reason = "likely to be replaced by range notation and adapters",
issue = "27777")]
#[rustc_deprecated(since = "1.5.0", reason = "replaced with ... syntax")]
Copy link
Contributor

Choose a reason for hiding this comment

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

But... the inclusive range syntax is not implemented yet

Copy link
Member Author

Choose a reason for hiding this comment

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

True, but this has been deprecated long enough that I'd be fine removing. I don't mind much either way though.

Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep it until there's an (unstable) alternative.

#[rustc_deprecated(since = "1.4.0",
reason = "unclear how useful or correct this is")]
pub fn from_str_radix(s: &str, radix: u32) -> Result<f32, ParseFloatError> {
num::Float::from_str_radix(s, radix)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that the actual implementation in core::num is still around. I assume this is to avoid dealing with the fallout, e.g. in the tests using from_str_radix("...", 16) later in this file? (By the way, don't those need to be updated to call Float::from_str_radix?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh right, I should delete the core impls as well!

@alexcrichton alexcrichton force-pushed the remove-deprecated branch 2 times, most recently from 5e7414a to 839e01a Compare December 3, 2015 21:55
@alexcrichton
Copy link
Member Author

This now also deletes the mandelbrot and spectralnorm shootout benchmarks from in-tree as simd is going away and it'd be nontrivial to define them locally. I believe the "official source" of our shootout benchmark implementations is now over at https://github.com/TeXitoi/benchmarksgame-rs anyway as well.

/// Converts a reference to A into a slice of length 1 (without copying).
#[unstable(feature = "ref_slice", issue = "27774")]
#[rustc_deprecated(since = "1.5.0", reason = "unclear whether belongs in libstd")]
pub fn ref_slice<A>(s: &A) -> &[A] {
Copy link
Member

Choose a reason for hiding this comment

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

Don't tell @nikomatsakis.

Copy link
Member

Choose a reason for hiding this comment

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

😢

@aturon
Copy link
Member

aturon commented Dec 4, 2015

LGTM modulo inclusive iterators.

@alexcrichton
Copy link
Member Author

@bors: r=aturon 057b5bafb9d86b0367adc2310f291ec0dddb2502

@bors
Copy link
Contributor

bors commented Dec 5, 2015

⌛ Testing commit 057b5ba with merge 09813eb...

@bors
Copy link
Contributor

bors commented Dec 5, 2015

💔 Test failed - auto-win-msvc-32-opt

@alexcrichton
Copy link
Member Author

@bors: r=aturon 700dc19fa7c6acedd0c5a89024b6fa8033c58587

@bors
Copy link
Contributor

bors commented Dec 5, 2015

⌛ Testing commit 700dc19 with merge 4bfcbf5...

@bors
Copy link
Contributor

bors commented Dec 5, 2015

💔 Test failed - auto-win-msvc-32-opt

@alexcrichton
Copy link
Member Author

@bors: r=aturon bf72f4cd966c038270d7efee048dd5631020d56c

@bors
Copy link
Contributor

bors commented Dec 5, 2015

⌛ Testing commit bf72f4c with merge 6954898...

@alexcrichton
Copy link
Member Author

@bors: r+ da055d1

@bors
Copy link
Contributor

bors commented Dec 9, 2015

⌛ Testing commit da055d1 with merge 958149f...

@bors
Copy link
Contributor

bors commented Dec 9, 2015

💔 Test failed - auto-mac-64-nopt-t

This is a standard "clean out libstd" commit which removes all 1.5-and-before
deprecated functionality as it's now all been deprecated for at least one entire
cycle.
@alexcrichton
Copy link
Member Author

@bors: r=aturon da50f7c

bors added a commit that referenced this pull request Dec 10, 2015
This is a standard "clean out libstd" commit which removes all 1.5-and-before
deprecated functionality as it's now all been deprecated for at least one entire
cycle.
@bors
Copy link
Contributor

bors commented Dec 10, 2015

⌛ Testing commit da50f7c with merge 47cd3a4...

@bors bors merged commit da50f7c into rust-lang:master Dec 10, 2015
@tshepang
Copy link
Member

wow, finally!

@alexcrichton alexcrichton deleted the remove-deprecated branch December 10, 2015 23:39
@@ -867,17 +867,6 @@ fn test_vec_default() {
}

#[test]
fn test_bytes_set_memory() {
Copy link
Contributor

Choose a reason for hiding this comment

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

how come this was removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Huh I thought I removed the trait, but I think we actually just deprecated the trait so I got mixed up.

bors added a commit that referenced this pull request Dec 12, 2015
The landing of #30182, specifically the removal of float `from_str_radix`, allowed the refactoring in the middle commit. While I was at it, I also crossed two other nits off my TODO list.
tamird added a commit to tamird/rust that referenced this pull request Dec 13, 2015
tamird added a commit to tamird/rust that referenced this pull request Dec 13, 2015
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