Skip to content

println! macro is unsafe #20051

Closed
Closed

Description

@perry-blueberry

Same issue that has been reported a few times popped up again: #10022. I'm using 1.89.0-nightly (255aa22 2025-06-19). This happen inside vscode on Ubuntu 24.04 if that makes a difference.

Activity

  1. Veykril commented on Jun 20, 2025

    @Veykril
    Member
  2. perry-blueberry commented on Jun 20, 2025

    @perry-blueberry
    Author

    Switched to yesterday's nightly and it works fine.

  3. brvtalcake commented on Jun 22, 2025

    @brvtalcake

    Switched to yesterday's nightly and it works fine.

    I got the same error and have been unsuccessfully trying to understand the problem for legit 5 hours, just to see your issue. Life is tough

    Is it a rustc issue though ? What should I roll-back ? Rust-analyzer ? Because I also tried multiple previous versions of it (actually, previous versions of the extension) and none worked, even when cargo cleaning and reloading the window/extensions

  4. ChayimFriedman2 commented on Jun 22, 2025

    @ChayimFriedman2
    Contributor

    It's not a rustc issue, it's a rust-analyzer issue, but it only occurs when you're on a new nightly toolchain. So you can rollback to a nightly before rust-lang/rust#140748. Alternatively, set "rust-analyzer.cargo.extraEnv": { "RUSTUP_TOOLCHAIN": "stable" }, which will cause r-a to analyze stable std instead.

  5. ShoyuVanilla commented on Jun 22, 2025

    @ShoyuVanilla
    Member

    I got the same error and have been unsuccessfully trying to understand the problem for legit 5 hours, just to see your issue. Life is tough

    Is it a rustc issue though ? What should I roll-back ? Rust-analyzer ? Because I also tried multiple previous versions of it (actually, previous versions of the extension) and none worked, even when cargo cleaning and reloading the window/extensions

    This is caused by internal changes within rustc that not yet implemented in rust-analyzer, so basically rust-analyzer issue.
    So, switching rust-analyzer versions won't work for now.

    Switched to yesterday's nightly and it works fine.

    I think what perry-blueberry meant with this comment is that they switched to yesterday(Of course, from the moment that they wrote the comment)'s nightly rustc without problematic change and it worked fine with it.

  6. ShoyuVanilla commented on Jun 22, 2025

    @ShoyuVanilla
    Member

    As #20056 has been merged, I think this would be fixed in next rust-analyzer releases, both nightly and stable.
    Though we still have some remaining homeworks in #20058, I'll finish it soon

  7. runiq commented on Jul 5, 2025

    @runiq

    I believe I'm hitting this on beta too.

  8. ChayimFriedman2 commented on Jul 5, 2025

    @ChayimFriedman2
    Contributor

    @Veykril could it be that #20056 is not on beta?

  9. Veykril commented on Jul 6, 2025

    @Veykril
    Member

    Oh indeed, we need to backport that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Broken WindowBugs / technical debt to be addressed immediately

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions