Stream: t-compiler/help

Topic: possible to re-use private code from libcore within liballoc


timotree (Sep 29 2019 at 17:03, on Zulip):

I was reading the sort impls on slices and I noticed some duplicated logic. In libcore there's a function called shift_head that has exactly the same code as a function called insert_head in liballoc. Is there some way to de-duplicate this?

timotree (Oct 02 2019 at 14:08, on Zulip):

to be clear, I'm just asking if it's possible to re-use private code from libcore within liballoc. If so, I would make a PR or something about this specific case.

simulacrum (Oct 02 2019 at 14:09, on Zulip):

Those functions can probably be made public (you definitely can't reuse private code) and #[doc(hidden)] and unstable, so we can use them but no one else can (easily)

Last update: Nov 11 2019 at 22:00UTC