Skip to content
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

"rewriting static" (the words) forcibly inserted at top of file on save #17486

Closed
ethanmsl opened this issue Jun 24, 2024 · 0 comments · Fixed by rust-lang/rust#126888
Closed
Assignees

Comments

@ethanmsl
Copy link

ethanmsl commented Jun 24, 2024

"This is a serious regression in nightly and it's important to fix it before the next release."

The words "rewriting static" are forcibly inserted at the top of my main.rs file. (please see two attached gifs, using different editors [zed & helix])

It's quite late for me, so I haven't had been able to delve into what triggers the behavior. (It's happening in my main.rs, but not lib.rs, for example). Below is some information to start though. Let me know what might be helpful to see from me if if anything.

  • Cause: installing install rustup nightly presently (re)causes the issue
    • (nightly-aarch64-apple-darwin unchanged - rustc 1.81.0-nightly (bcf94dec5 2024-06-23))
  • Fix: installing rustup install nightly-2024-06-20 (and setting to same in rust-toolchain.toml) removes the issue
    • ( nightly-2024-06-20-aarch64-apple-darwin installed - rustc 1.81.0-nightly (d8a38b000 2024-06-19)

In both cases rust-analyzer --version returns:

  • rust-analyzer 1.79.0 (129f3b99 2024-06-10)
    (I'm not sure if I'm calling this incorrectly or rust-analyzer isn't alone the culprit and instead an interaction with the compiler. (or something in the compiler besides rust-analyzer can trigger code insertion)

rust_analyzer_bug_zedexample

rust_analyzer_bug_helixexample

@ethanmsl ethanmsl added the Broken Window Bugs / technical debt to be addressed immediately label Jun 24, 2024
@lnicola lnicola removed the Broken Window Bugs / technical debt to be addressed immediately label Jun 24, 2024
@lnicola lnicola self-assigned this Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants