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

println! and tokio::main reported as unsafe functions #12751

Closed
OverHash opened this issue Jul 13, 2022 · 4 comments
Closed

println! and tokio::main reported as unsafe functions #12751

OverHash opened this issue Jul 13, 2022 · 4 comments

Comments

@OverHash
Copy link

OverHash commented Jul 13, 2022

rust-analyzer is reporting basic macros like println! and #[tokio::main] as unsafe functions.
image
image

These issues have only recently appeared. Running cargo check shows that my workspace is fine.

rust-analyzer version: rust-analyzer version: 0.0.0 (5342f47 2022-07-09)

rustc version: rustc 1.62.0 (a8314ef7d 2022-06-27)

@OverHash
Copy link
Author

Perhaps this is related to #12719?

Similar issue to #10022 in the past.

@OverHash
Copy link
Author

OverHash commented Jul 13, 2022

Downgrading to rust-analyzer version: 0.0.0 (75b2232 2022-07-03) works fine.

@Veykril
Copy link
Member

Veykril commented Jul 13, 2022

Does upgrading your rust version also fix it? or is this not an option for you? In general we only really try to support the latest stable rust.

@OverHash
Copy link
Author

I figured it out! vscode is using my Windows version of Rust, which was 1.56.1, rather than my WSL version, which was at 1.62.0. Upgrading my Windows variant resolved the issue 🎉.

Apologies for the misunderstanding.

max-sixty added a commit to max-sixty/prql that referenced this issue May 24, 2023
`rust-analyzer` is now raising mistaken errors for 1.65, as they only support the latest version rust-lang/rust-analyzer#12751 (comment)

We don't want to bump the required version because of PRQL#1561, but I think this approach:
- Lets us work on an updated version
- Tests `prql-compiler` & `prqlc` to ensure they don't fail to support 1.65
- Doesn't let us use any new features in `prql-compiler` or `prqlc` until we bump the required version, but that's completely fine (is there even _anything_ we'd use?)
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

No branches or pull requests

2 participants