Skip to content

Some features were removed instead of deprecated/stabilized #60427

Not planned
@jethrogb

Description

@jethrogb
Contributor

From @varkor in #52644 (comment):

it seems some past features were simply removed outright rather than being deprecated as they should be. ... I think we'll need to retroactively make these features deprecated.

This applies at least to the following features:

  • collections
  • str_char
  • unicode
  • alloc

There might be others.

Activity

changed the title [-]Some features were removed instead of deprecated[/-] [+]Some features were removed instead of deprecated/stabilized[/+] on Apr 30, 2019
added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on May 1, 2019
Centril

Centril commented on May 1, 2019

@Centril
Contributor

If they were stabilized they should be added to the accepted list and otherwise to the removed list.

rasendubi

rasendubi commented on May 2, 2019

@rasendubi
Contributor
  1. All of the mentioned flags are lib flags. Is it OK to add them to feature_gate.rs? (I am not sure as these are "lang" features and might be handled differently.)

  2. e.g., fs_read_write was stabilized as fs_read_write_bytes (0600d0f). Should we add the old name? as accepted?

  3. A part of alloc was renamed to alloc_prelude (without stabilization) (5d1022a). The rest was stabilized as alloc (fc928a1). @jethrogb are you sure you get an error when using alloc?

(If anyone feels like doing code archeology, a simple git log -p -G '"str_char"' seems to give pretty good results.)

jethrogb

jethrogb commented on May 2, 2019

@jethrogb
ContributorAuthor
  1. e.g., fs_read_write was stabilized as fs_read_write_bytes (0600d0f). Should we add the old name? as accepted?

I think they should be added as removed

  1. ... @jethrogb are you sure you get an error when using alloc?

I thought I was with some nightly version between nightly-2018-08-14 and nightly-2019-04-27, but I can't reproduce this right now.

varkor

varkor commented on May 4, 2019

@varkor
Member
  1. All of the mentioned flags are lib flags. Is it OK to add them to feature_gate.rs? (I am not sure as these are "lang" features and might be handled differently.)

Yeah, I'm not sure whether we want to flag removed libs features differently. It'd probably be nice to keep a record, but I'm not sure if the difference is valuable.

  1. e.g., fs_read_write was stabilized as fs_read_write_bytes (0600d0f). Should we add the old name? as accepted?

I agree with @jethrogb: we should probably mark it as removed. (Alternatively, we could track "renamings of feature flags", like we do for lints, so we could produce better diagnostics.)

Centril

Centril commented on May 4, 2019

@Centril
Contributor

It's rather weird to add libs features to the language feature list. I also think it's not the end of the world to just throw away the removed feature gate list entirely (dump it in a document somewhere outside of the code); it's essentially technical debt that we are monotonically increasing at the moment. The only think that we'd need to do is to not error. Adding these features, which seemingly hasn't bothered anyone for a long time, only for the purposes of consistency seems to be a weak motivation.

Enselic

Enselic commented on Nov 20, 2023

@Enselic
Member

Triage: Since many years has passed now the risk of messing with feature flags seems greater than the benefit of fixing them (and I'm unsure exactly what that means atm tbh). I'll go ahead and close this with this motivation from above comment:

Adding these features, which seemingly hasn't bothered anyone for a long time, only for the purposes of consistency seems to be a weak motivation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Enselic@Centril@jethrogb@rasendubi@varkor

        Issue actions

          Some features were removed instead of deprecated/stabilized · Issue #60427 · rust-lang/rust