Rust: No warning for obsolete allocator syntax

Created on 3 Jan 2018  路  2Comments  路  Source: rust-lang/rust

The syntax for changing allocators (e.g. opting out of jemalloc) changed in a July nightly (see #43277 and this discussion thread. Users of the old syntax don't get any warning or build breakage, they just get silently changed back to the default allocator because the old syntax doesn't work anymore. It's difficult for users to track down why their program's behavior has suddenly changed without knowing about this syntax change. Case in point: the linked discussion thread is about a jemalloc-specific bug that resurfaced after this change landed, which took a reasonable chunk of time to understand.

A-allocators A-diagnostics C-enhancement T-compiler

Most helpful comment

We sometimes have deprecation warnings when unstable APIs change, but as far as I know it鈥檚 not a requirement and not always done. There is ~zero compatibility guarantee for unstable features between different Nightly versions.

This particular feature has just been stabilized, so I鈥檒l close this. Up to date docs are at:

If you鈥檇 like to discuss the meta policy around this or propose a change to it, I suggest opening a thread on https://internals.rust-lang.org/.

All 2 comments

As I've raised in the thread linked by bfops, I believe we have a documentation problem here.
Usually when existing API's are deprecated (even unstable ones), we warn on the old version, for easier migration.

@bfops did a respectable amount of detective-work in the linked thread: this is a direct result of rust-lang/rfcs/pull/1974, as implemented by @alexcrichton in #42727 (merged in commit 1685c9298685f73db4fe890c1ed27b22408aaad7)
(to link all the relevant bits/people)

We sometimes have deprecation warnings when unstable APIs change, but as far as I know it鈥檚 not a requirement and not always done. There is ~zero compatibility guarantee for unstable features between different Nightly versions.

This particular feature has just been stabilized, so I鈥檒l close this. Up to date docs are at:

If you鈥檇 like to discuss the meta policy around this or propose a change to it, I suggest opening a thread on https://internals.rust-lang.org/.

Was this page helpful?
0 / 5 - 0 ratings