We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
unresolved import
main
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
rust-analyzer version: (eg. output of "Rust Analyzer: Show RA Version" command)
rust-analyzer version: 0add6e9 2021-12-20 stable
rustc version: (eg. output of rustc -V)
rustc -V
rustc 1.57.0 (f1edd0429 2021-11-29)
rust-analyzer extension version:
0.2.867
Hi, I try to re-export the main and test macro of tokio in my crate just like this:
test
tokio
pub use tokio::{main, test};
rust_analyzer warns unresolved import for main macro but the test macro is ok. However, this codes pass cargo check and cargo build.
rust_analyzer
cargo check
cargo build
The same issue also happens for async-std async runtime.
async-std
The text was updated successfully, but these errors were encountered:
I think this was brought up before, it's because of the #[cfg(not(test))] on the macro
#[cfg(not(test))]
Sorry, something went wrong.
Duplicate of #12450.
No branches or pull requests
rust-analyzer version: (eg. output of "Rust Analyzer: Show RA Version" command)
rust-analyzer version: 0add6e9 2021-12-20 stable
rustc version: (eg. output of
rustc -V
)rustc 1.57.0 (f1edd0429 2021-11-29)
rust-analyzer extension version:
0.2.867
Hi, I try to re-export the
main
andtest
macro oftokio
in my crate just like this:rust_analyzer
warnsunresolved import
formain
macro but thetest
macro is ok. However, this codes passcargo check
andcargo build
.The same issue also happens for
async-std
async runtime.The text was updated successfully, but these errors were encountered: