4 ms·
> That code worked through at least Rust 1.2. So, yes, Rust has removed an API since 1.0. That code was compiling in December 2016. How sure are you that this
by Manishearth 10y ago
> That code worked through at least Rust 1.2. So, yes, Rust has removed an API since 1.0. That code was compiling in December 2016.
How sure are you that this was compiled with Rust 1.2 and not some old rustc?
Here is a copy of the docs for Vec from June 2016: https://github.com/Manishearth/rust-internals-docs/blob/9419844ea1b96e808b84919572f9f917063a89d4/collections/vec/struct.Vec.html https://github.com/Manishearth/rust-internals-docs/blob/9419...
There is no join method there.
There is a join method on slices (which vectors dereference to). https://github.com/Manishearth/rust-internals-docs/blob/9419844ea1b96e808b84919572f9f917063a89d4/std/primitive.slice.html#L1401 https://github.com/Manishearth/rust-internals-docs/blob/9419...
This method still exists. It used to take a delimeter argument, and works the same way today. https://play.rust-lang.org/?gist=13d19cd5dd33c1efb046cc69bec05d99&version=stable&backtrace=0 https://play.rust-lang.org/?gist=13d19cd5dd33c1efb046cc69bec...
There have been various language tweaks, but Rust has not removed a (stable) API since 1.0.
- tatterdemalion 10y agoBoth of these errors are reproducible with the 1.2 compiler, but not with the 1.17 compiler. Most likely this user believed they were compiling with 1.17 but they were compiling with 1.2.
- Manishearth 10y agoAh, in that case I can guess what happened. SliceConcatExt was probably not in the prelude back then. Well, we never guaranteed forward compatibility :)
- tatterdemalion 10y agoMight be that, might also be that SliceConcatExt only had connect in 1.2, not join.
- Manishearth 10y agoNo, it had join, see docs link above.