Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for libcore prelude traits #32110
Comments
alexcrichton
added
T-libs
B-unstable
labels
Mar 8, 2016
pnkfelix
referenced this issue
Jul 6, 2016
Closed
SliceExt: More flexible binary_search_by and binary_search_by_key #34683
paholg
referenced this issue
Jul 22, 2016
Merged
Allow approx to be used without the standard library. #4
This comment has been minimized.
This comment has been minimized.
|
I believe that libcore is now mostly stable, aside from those below. As far as I can tell, none of these are directly in the prelude, though I may be wrong. Perhaps this can be closed?
|
This comment has been minimized.
This comment has been minimized.
|
@Mark-Simulacrum How did you make this list? It’s missing at least |
This comment has been minimized.
This comment has been minimized.
|
I can't find the command in my history right now for some reason. I guess I messed up with the ripgrep parameters, though. No need for the list now though, since you've provided it :). |
This comment has been minimized.
This comment has been minimized.
|
We certainly should move non-allocating inherent slice methods into libcore as inherent methods, and not the trait mess we’re currently in. I’m fairly sure we could hack the compiler enough to allow multiple inherent |
Mark-Simulacrum
added
the
C-tracking-issue
label
Jul 22, 2017
This comment has been minimized.
This comment has been minimized.
|
Hello, I'm seeing that the |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton Should |
This comment has been minimized.
This comment has been minimized.
|
In general yes, functionality stable in libstd is fine to ensure is available in libcore as well. Looking at the trait it also has a stable |
This comment has been minimized.
This comment has been minimized.
|
I also see that for the |
This comment has been minimized.
This comment has been minimized.
|
Those are ones we'd specifically actually not want to stabilize as well because they require runtime support. Their definitions in libcore should likely be removed. |
This comment has been minimized.
This comment has been minimized.
michael-p
commented
Mar 6, 2018
|
So if one needs to use |
This comment has been minimized.
This comment has been minimized.
|
I was thinking on porting parts of libm to Rust using corrode or something similar, since I also would like to have I ported most of some code to use I haven't started any work on |
This comment has been minimized.
This comment has been minimized.
|
@Razican for sure yeah it's useful to have in libcore but it should be explicitly improted. Something like |
This comment has been minimized.
This comment has been minimized.
@alexcrichton Does this also apply to the |
This comment has been minimized.
This comment has been minimized.
|
@SimonSapin yes ideally anything requiring runtime support is only stabilized in libstd, although that ship may have already sailed. |
This comment has been minimized.
This comment has been minimized.
|
The To be clear, what does "runtime support" mean here exactly? You seem to be suggesting it includes anything that calls into an LLVM intrinsic but as far as I can tell plenty of things in libcore do that. |
This comment has been minimized.
This comment has been minimized.
|
To me "runtime support" is "on any platform this lowers to a call to |
This comment has been minimized.
This comment has been minimized.
|
Sounds good. Do you know how I can find out which intrinsics can lower to calls to libm? |
This comment has been minimized.
This comment has been minimized.
|
Unfortunately I'm not sure there's a great way other than "compile it for a bunch of platforms and see what LLVM does" |
This comment has been minimized.
This comment has been minimized.
|
The relevant intrinsics are:
The |
This comment has been minimized.
This comment has been minimized.
|
#27823 moved a number of float methods (back) from libcore to libstd, but specifically left |
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Apr 12, 2018
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Apr 12, 2018
SimonSapin
referenced this issue
Apr 12, 2018
Merged
Add inherent methods in libcore for [T], [u8], str, f32, and f64 #49896
This comment has been minimized.
This comment has been minimized.
|
#49896 replaces these traits with inherent methods. |
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Apr 13, 2018
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Apr 13, 2018
bors
added a commit
that referenced
this issue
Apr 14, 2018
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Apr 20, 2018
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Apr 20, 2018
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Apr 20, 2018
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Apr 20, 2018
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Apr 21, 2018
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
Apr 21, 2018
bors
added a commit
that referenced
this issue
Apr 22, 2018
This comment has been minimized.
This comment has been minimized.
|
I’ve filed #50145 specifically for |
alexcrichton commentedMar 8, 2016
These are currently all unstable but part of the libcore prelude.
This is currently intentional, but the fact that they need to be unstable is somewhat unsettling. Arguably all unstable features in libcore should be on the path to deprecation or stabilization at some point.