Skip to content

Remove modes from libstd and libcore at least, enable deprecated mode warning by default #3323

Closed
@graydon

Description

@graydon
Contributor
No description provided.

Activity

ghost assigned on Aug 31, 2012
graydon

graydon commented on Aug 31, 2012

@graydon
ContributorAuthor

Some other components of this bug:

  • Fix main to not take args, just have a sys::get_argv or something
  • Fix the Eq and Cmp traits
  • Add a -Z flag for compiling with the old mode logic; turn old mode logic off by default, only on for rustc (and/or old libraries if they don't get done in time)
bblum

bblum commented on Sep 4, 2012

@bblum
Contributor

why not have main's optional arguments be &[~str] instead of &&~[~str]?

jdm

jdm commented on Sep 5, 2012

@jdm
Contributor

One benefit of a sys::get_argv is that it reduces the "public static void main(String[] args)" factor.

brson

brson commented on Sep 29, 2012

@brson
Contributor

I prefer to keep the main argv signature, mostly because sometimes it's useful to call main manually, and not having an argv in the signature means involving global runtime state. For example, the jit is currently tested by building crates and calling main.

nikomatsakis

nikomatsakis commented on Sep 29, 2012

@nikomatsakis
Contributor

I agree with @brson. We were discussing this the other day and I remembered how much I dislike how Python does it. I always end up making a main(args) fn anyhow. Basically it's bad for all the normal reasons global state is bad—it's unclear what the inputs to the fn are, and it gives the caller no control over them.

catamorphism

catamorphism commented on Oct 1, 2012

@catamorphism
Contributor

Current status: serialization and serialization2 cause several mode warnings, and net_tcp causes one warning. Two others (in ptr and extfmt) will go away once I make a new snapshot. This is otherwise done.

catamorphism

catamorphism commented on Oct 5, 2012

@catamorphism
Contributor

Still warnings from (in core) stackwalk::frame_address, and (in std) net_tcp and serialization. Otherwise done. Deprecated modes forbidden in all modules except these, AFAIK.

catamorphism

catamorphism commented on Oct 6, 2012

@catamorphism
Contributor

I'm closing this because we've done all we're going to do for 0.4; the ones I mentioned in my previous comment have been muted.

added a commit that references this issue on May 5, 2020

Auto merge of rust-lang#5536 - rail-rain:fix_manual_memcpy, r=phansch

added a commit that references this issue on May 15, 2021

Merge pull request rust-lang#3323 from scampi/failure-repo

ecde43e
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

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-cleanupCategory: PRs that clean code up or issues documenting cleanup.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @graydon@jdm@brson@nikomatsakis@catamorphism

        Issue actions

          Remove modes from libstd and libcore at least, enable deprecated mode warning by default · Issue #3323 · rust-lang/rust