Skip to content

rustc should notify users when optimizations are disabled #777

Closed
@tanadeau

Description

@tanadeau

As the Rust community gets more developers coming from JIT'ed or interpreted languages like Java, Python, Ruby, etc., we are going to see more problems where they assume rustc my_file.rs will give fast results even though optimizations are off by default. This can be seen in several threads on Stack Overflow and other forums, including Rust's own (http://users.rust-lang.org/t/reading-numbers-from-a-file/171).

I suggest that when no optimization flags are enabled, rustc should print out a message similar to the following:

rustc my_file.rs
Note: Optimizations are disabled (debug mode). Turn them on by passing the -O flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-cargoRelevant to the Cargo team, which will review and decide on the RFC.T-compilerRelevant to the compiler team, which will review and decide on the RFC.T-docRelevant to the documentation team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions