Skip to content

Blessing clippy with x.py does not work the same way as other tools #102093

Closed
@RalfJung

Description

@RalfJung

I can this command:

./x.py test src/tools/clippy --stage 1 --bless

I expected this to bless the test files. Instead I got output like this:

-error: aborting due to 8 previous errors
+error[E0080]: evaluation of constant value failed
+  --> $DIR/indexing_slicing_index.rs:10:24
+   |
+LL | const REF_ERR: &i32 = &ARR[idx4()]; // Ok, let rustc handle const contexts.
+   |                        ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
+
+error: aborting due to 9 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
 

The actual stderr differed from the expected stderr.
Actual stderr saved to /home/r/src/rust/rustc.3/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/test/ui/indexing_slicing_index.stage-id.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args indexing_slicing_index.rs`

Ironically, the output tells me to add --bless, which I already did!

Cc @rust-lang/clippy

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-clippyArea: ClippyA-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-testsuiteArea: The testsuite used to check the correctness of rustc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions