-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bootstrap: Fix compile error: unused-mut #110996
Conversation
r? @ozkanonur (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How exactly are you compiling this project? You shouldn't get an error like that since it's used as mutable couple lines below.
--
But I am curious why this doesn't throw any error when defined as immutable and modified later. Am I missing something here? cc @rust-lang/compiler
The type of |
I didn't know it was possible to mutate any type without declaring -- I think having |
This is probably caused by #110960. Do we not test bootstrap with the stage1/2 compiler? |
We don't. bootstrap is built/tested with beta compiler. |
Thanks for your review.
@ozkanonur I cross-compiled the source code for rust/master on x86_64 with the target set to loongarch. However, when I attempted to use the cross-compiled rust toolchain as stage0 for native compilation on the loongarch system, I encountered an error.
@lukas-code I suspect that rust/master was not used as stage0 or was downloaded from CI for other targets? |
stage0 is the pre-compiled beta compiler downloaded from CI
Yeah, seems like. I get that warning on the bootstrap build using -- Thank you for catching this! @heiher @bors r+ rollup |
…nonur bootstrap: Fix compile error: unused-mut Compile errors: ``` Compiling bootstrap v0.0.0 (/home/hev/rust/rust/src/bootstrap) error: variable does not need to be mutable --> config.rs:1312:17 | 1312 | let mut build_target = config | ----^^^^^^^^^^^^ | | | help: remove this `mut` | = note: `-D unused-mut` implied by `-D warnings` error: could not compile `bootstrap` (lib) due to previous error ```
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#110118 (download-rustc: Give a better error message if artifacts can't be dowloaded) - rust-lang#110631 (rustdoc: catch and don't blow up on impl Trait cycles) - rust-lang#110732 (Make ConstProp some tests unit.) - rust-lang#110996 (bootstrap: Fix compile error: unused-mut) - rust-lang#110999 (Output some bootstrap messages on stderr) - rust-lang#111000 (Remove unneeded function call in `core::option`.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Compile errors: