Skip to content

bootstrap: --warnings warn doesn't apply to bootstrap itself #76805

Closed
@matthiaskrgr

Description

@matthiaskrgr

Bootstrapping with RUSTFLAGS="-Wsomething that warns ./x.py check --warnings warn does not work; a warning inside bootstrap will still abort the compilation process:

error: trivial numeric cast: `u32` as `u32`
   --> src/bootstrap/lib.rs:156:31
    |
156 |             libc::setpriority(libc::PRIO_PGRP as _, 0, 10);
    |                               ^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D trivial-numeric-casts` implied by `-D warnings`
    = help: cast can be replaced by coercion; this might require a temporary variable

error: aborting due to previous error

error: could not compile `bootstrap`.

EDIT: well, putting --cap-lints warn into RUSTFLAGS works but it seems very unintuitive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions