Skip to content

./x build compiler --stage 0 reports success, but it shouldn't: deleting method used in another crate does not cause compilation to fail #134970

Closed
@safinaskar

Description

@safinaskar

./x build compiler --stage 0 reports success, but it shouldn't: deleting method used in another crate does not cause compilation to fail.

Okay, I found bug in ./x. If I delete a method in compiler source code, then ./x build compiler --stage 0 executes successfully. But it shouldn't, because this method is used in another compiler's crate.

Steps to reproduce (on x86_64 Linux):

  • Clone the compiler: git clone --depth=1 https://github.com/rust-lang/rust
  • Run cd rust
  • Run cp config.example.toml config.toml
  • Run ./x build library (this command will execute successfully)
  • Edit file compiler/rustc_ast/src/token.rs: comment function pub fn is_like_plus
  • Run ./x build compiler --stage 0, this command will succeed. But it shouldn't, because is_like_plus is used in another crate!
  • Run ./x build library. This command will correctly fail

I found this bug when attempting to contribute to rustc. So this bug presents minor contributor roadblock, so I mark it so.

I used current HEAD, i. e. aea4e43 .

The bug seems to be related to #134916 .

@rustbot label A-contributor-roadblock T-bootstrap C-bug

Metadata

Metadata

Assignees

Labels

A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustC-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