-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
ec12c9e
to
b6189aa
Compare
r? @aturon Note that this does not attempt to remove |
#[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")] |
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.
But... the inclusive range syntax is not implemented yet
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.
True, but this has been deprecated long enough that I'd be fine removing. I don't mind much either way though.
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.
I think we should keep it until there's an (unstable) alternative.
b6189aa
to
8a72c97
Compare
#[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) |
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.
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
?)
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.
Oh right, I should delete the core impls as well!
5e7414a
to
839e01a
Compare
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. |
839e01a
to
d54d9fd
Compare
/// 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] { |
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.
Don't tell @nikomatsakis.
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.
😢
LGTM modulo inclusive iterators. |
d54d9fd
to
057b5ba
Compare
@bors: r=aturon 057b5bafb9d86b0367adc2310f291ec0dddb2502 |
⌛ Testing commit 057b5ba with merge 09813eb... |
💔 Test failed - auto-win-msvc-32-opt |
057b5ba
to
700dc19
Compare
@bors: r=aturon 700dc19fa7c6acedd0c5a89024b6fa8033c58587 |
⌛ Testing commit 700dc19 with merge 4bfcbf5... |
💔 Test failed - auto-win-msvc-32-opt |
700dc19
to
bf72f4c
Compare
@bors: r=aturon bf72f4cd966c038270d7efee048dd5631020d56c |
⌛ Testing commit bf72f4c with merge 6954898... |
@bors: r+ da055d1 |
⌛ Testing commit da055d1 with merge 958149f... |
💔 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.
da055d1
to
da50f7c
Compare
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.
wow, finally! |
@@ -867,17 +867,6 @@ fn test_vec_default() { | |||
} | |||
|
|||
#[test] | |||
fn test_bytes_set_memory() { |
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.
how come this was removed?
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.
Huh I thought I removed the trait, but I think we actually just deprecated the trait so I got mixed up.
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.
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.