Skip to content

rust -W prints the list of lint checks in non-deterministic order #7818

Closed
@pnkfelix

Description

@pnkfelix

On my Mac:

% ./objdir-dbgopt/x86_64-apple-darwin/stage2/bin/rustc -v
./objdir-dbgopt/x86_64-apple-darwin/stage2/bin/rustc 0.8-pre (69eb3cd 2013-07-15 20:53:15 +0200)
host: x86_64-apple-darwin
% ./objdir-dbgopt/x86_64-apple-darwin/stage2/bin/rustc -W

Available lint options:
    -W <foo>           Warn about <foo>
    -A <foo>           Allow <foo>
    -D <foo>           Deny <foo>
    -F <foo>           Forbid <foo> (deny, and deny all overrides)


Available lint checks:

                                name  default  meaning
                                ----  -------  -------

    non-implicitly-copyable-typarams     warn  passing non implicitly copyable types as copy type params
               non-uppercase-statics    allow  static constants should have uppercase identifiers
                         heap-memory    allow  use of any (~ type or @ type) heap memory
                non-camel-case-types    allow  types, variants and traits should have camel case names
                    unreachable-code     warn  detects unreachable code
                      path-statement     warn  path statements with no effect
                     unused-variable     warn  detect variables which are not used in any way
                 managed-heap-memory    allow  use of managed (@ type) heap memory
                       unused-unsafe     warn  unnecessary use of an `unsafe` block
                      unused-imports     warn  imports that are never used
                          while-true     warn  suggest using loop { } instead of while(true) { }
                         type-limits     warn  comparisons made useless by limits of the types involved
                     default-methods    allow  allow default methods
              unnecessary-allocation     warn  detects unnecessary allocations that can be eliminated
                     implicit-copies     warn  implicit copies of non implicitly copyable data
                            warnings     warn  mass-change the level for lints which produce warnings
                     dead-assignment     warn  detect assignments that will never be read
           unnecessary-qualification    allow  detects unnecessarily qualified names
                   unrecognized-lint     warn  unrecognized lint attribute
                         missing-doc    allow  detects missing documentation for public members
                              ctypes     warn  proper use of std::libc types in foreign modules
                   owned-heap-memory    allow  use of owned (~ type) heap memory
                          unused-mut     warn  detect mut variables which don't need to be mutable
                  deprecated-pattern    allow  warn about deprecated uses of pattern bindings

% ./objdir-dbgopt/x86_64-apple-darwin/stage2/bin/rustc -W

Available lint options:
    -W <foo>           Warn about <foo>
    -A <foo>           Allow <foo>
    -D <foo>           Deny <foo>
    -F <foo>           Forbid <foo> (deny, and deny all overrides)


Available lint checks:

                                name  default  meaning
                                ----  -------  -------

    non-implicitly-copyable-typarams     warn  passing non implicitly copyable types as copy type params
                     dead-assignment     warn  detect assignments that will never be read
                     implicit-copies     warn  implicit copies of non implicitly copyable data
                      path-statement     warn  path statements with no effect
                              ctypes     warn  proper use of std::libc types in foreign modules
                     default-methods    allow  allow default methods
                      unused-imports     warn  imports that are never used
           unnecessary-qualification    allow  detects unnecessarily qualified names
                          while-true     warn  suggest using loop { } instead of while(true) { }
                   unrecognized-lint     warn  unrecognized lint attribute
                       unused-unsafe     warn  unnecessary use of an `unsafe` block
                          unused-mut     warn  detect mut variables which don't need to be mutable
                non-camel-case-types    allow  types, variants and traits should have camel case names
                         missing-doc    allow  detects missing documentation for public members
                    unreachable-code     warn  detects unreachable code
              unnecessary-allocation     warn  detects unnecessary allocations that can be eliminated
                         type-limits     warn  comparisons made useless by limits of the types involved
                   owned-heap-memory    allow  use of owned (~ type) heap memory
                            warnings     warn  mass-change the level for lints which produce warnings
                     unused-variable     warn  detect variables which are not used in any way
                 managed-heap-memory    allow  use of managed (@ type) heap memory
                         heap-memory    allow  use of any (~ type or @ type) heap memory
               non-uppercase-statics    allow  static constants should have uppercase identifiers
                  deprecated-pattern    allow  warn about deprecated uses of pattern bindings

% 

It would be better if the printout ordering were normalized; e.g. sort by name, or by (default, name), something. Just something so someone eyeballing log output doesn't get concerned about such changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions